View previous topic :: View next topic |
Author |
Message |
salam Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 29 Sep 2005 Posts: 227
|
Posted: Tue Sep 25, 2007 5:18 pm Post subject: postfix, mysql and local maps |
|
|
Hello,
Any idea how to force postfix to read user information for local recipients from mysql and not use unix:passwd.byname?
For virtual domains, all works ok, but local always tries to read from passwd file and completely ignores mysql.
Example:
user Bob has e-mail bob.smith@domain.com (domain.com is a local one)
he also has shell access, indentified only as "Bob" in passwd file
as postfix reads local users from passwd, i get a result "unknown user", though 'users' table in mysql contains email bob.smith@domain.com, homedir /home/bob maildir /home/bob/.maildir
Does exist something, that will disallow postfix to look into passwd file and correctly select from mysql?
One solution is to add bob.smith bob@domain.com to alias table, but this will also replace "To:" header in mail, so i don't like it very much |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Stever Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 01 Mar 2005 Posts: 151 Location: North Carolina
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Stever Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 01 Mar 2005 Posts: 151 Location: North Carolina
|
Posted: Tue Sep 25, 2007 6:04 pm Post subject: |
|
|
Sorry, posted the wrong link. This is probably what you are looking for:
http://www.postfix.org/LOCAL_RECIPIENT_README.html
Quote: | Problem: you don't use the default Postfix local( delivery agent for domains matching $mydestination, $inet_interfaces, or $proxy_interfaces. For example, you redefined the "local_transport" setting in main.cf.
Solution: your local_recipient_maps setting needs to specify a database that lists all the known user names or addresses for that delivery agent. For example, if you deliver users in $mydestination etc. domains via the virtual( delivery agent, specify:
/etc/postfix/main.cf
mydestination = $myhostname localhost.$mydomain localhost ...
local_transport = virtual
local_recipient_maps = $virtual_mailbox_maps
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kashani Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/9629732313ee51df8c5935.jpg)
Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Tue Sep 25, 2007 10:37 pm Post subject: |
|
|
Isn't the easiest solution to to change your local domain to virtual. Generally I set host.domain.com to mydestination and myorigin because those must be local IIRC. Then you can assign domain.com to be virtual without making Postfix act funny.
kashani _________________ Will personally fix your server in exchange for motorcycle related shop tools in good shape. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|