|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: local vs virtual accounts
From: Alex (postfix
webgate.ro)
Date: Wed Mar 10 2004 - 15:01:26 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello Kyle,
Ideed, you are right:
I added one thing to my present config file, as you sugested
virtual_maps = mysql:/etc/postfix/mysql_redirections.cf, $alias_maps
where alias_maps = hash:/etc/aliases and now, emails goes correctly.
Regarding your last sugestion i want to tell you that local_recipient
maps and local_transport seems to be unusefull in case of all accounts
are virtuals. I made some tests, and with any of below lines, postfix is
working. Maybe somebody can tell me if local_* directives, are used or
no in this case.
#local_recipient_maps = $alias_maps
local_recipient_maps =
#local_transport = virtual
#local_transport = local:$myhostname //default value
local_transport = local:$mydomain
Alex
Kyle Dent wrote:
>On Wed, 10 Mar 2004, Alex wrote:
>
>
>
>>I have installed and working postfix-2.0.16+Mysql+Maildrop used as LDA
>>and EVERITHING IS "VIRTUALIZED".... No shell accounts! Now i'm a little
>>bit confused with some settings imposed by some pseudo shell accounts
>>used to send mail from (for ex: mysql, ftp, spam, www) containing some
>>daily reports about activities of some daemons. On present
>>configuration, i can send email FROM but i can't sent TO this users.
>>Could be some situations, when message sent by a pseudo user, is
>>bounced, and should be returned to sender. Because on my server does not
>>exist this email account, message will be double bounced and will arrive
>>to postmaster
mydom.com email account. Here is the problem, because i
>>don't want message to be double bounced.
>>
>>To solve this problem there are 2 methods AFAIK:
>>1.Use sql to vitualize ALL pseudo shell accounts and redirect mail for
>>them to root OR,
>>2.Use something STATIC, like /etc/aliases and redirect mail to root.
>>
>>I would like to use the second one methond to skip some SQL queries.
>>
>>All i want to know is how to setup postfix to accept as destination,
>>mysql
mydom.com if account mysql exist in /etc/aliases and redirect
>>message to address specified in this file (root
mydom.com)
>>
>>For example /etc/aliases contain:
>>bin: root
>>mysql: root
>>spam: root
>>mailer-daemon: postmaster
>>
>>NOW <bin> is trying to send mail to <mysql>.
>>
>>In a telnet session, just sender address is accepted!
>>
>>telnet localhost 25
>>....
>>mail from:<bin>
>>250 Ok
>>rcpt to:<mysql>
>>550 <mysql>: User unknown in virtual mailbox table
>>rcpt to: <root>
>>250 Ok
>>.....
>>PLEASE NOTE THAT HERE <root> is A SQL VIRTUALIZED ACCOUNT
>>
>>See below some representative parts of my main.cf related to this problem.
>>
>>### General settings ###
>>myhostname = mail.mydom.com
>>mydomain = mydom.com
>>myorigin = $mydomain
>>mydestination = localhost, localhost.localdomain, $myhostname
>>mynetworks = 127.0.0.1/32
>>
>>### Redirections for pseudo accounts ###
>>alias_database = hash:/etc/aliases
>>alias_maps = hash:/etc/aliases
>>local_recipient_maps = $alias_maps
>>local_transport = virtual
>>
>>### Maildrop as LDA - Mysql settings ###
>>transport_maps = mysql:/etc/postfix/mysql_transport.cf
>>virtual_mailbox_domains = mysql:/etc/postfix/mysql_domains.cf
>>virtual_mailbox_maps = mysql:/etc/postfix/mysql_users.cf
>>virtual_maps = mysql:/etc/postfix/mysql_redirections.cf
>>virtual_transport = virtual
>>
>>
>
>Since you have local_transport set to virtual, you'll have to
>create virtual aliases for your pseudo accounts. You can create
>them in a separate hash table if you don't want to add them to
>your MySQL table, e.g.:
>
> virtvirtual_maps = mysql:/etc/postfix/mysql_redirections.cf
> hash:/etc/postfix/pseudo_accounts
>
>Otherwise, to make them delivered locally, you'll have to leave
>local_transport at the default, set my_origin to $myhostname (or
>othewise ensure that these accounts send may as
>mysql
mail.mydom.com), and add the pseudo accounts to your local
>aliases file.
>
>Kyle
>
>
>
>
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]