| Linode Forum https://forum.linode.com/ |
|
| Postfix newbie virtual domain problem - FIXED https://forum.linode.com/viewtopic.php?f=11&t=2444 |
Page 1 of 1 |
| Author: | Shawn [ Wed Sep 13, 2006 9:54 pm ] |
| Post subject: | Postfix newbie virtual domain problem - FIXED |
Hello folks, I've been pulling my hair out trying to figure this one out. I'm fairly new to postfix and I thought I had it all set up correctly, but I can't get it working completely. Basically, if I email user@domain.com (substituted with a real domain name that I have set up) I get the following message: Quote: This is the Postfix program at host mithras. I'm sorry to have to inform you that your message could not be be delivered to one or more recipients. It's attached below. For further assistance, please send mail to <postmaster> If you do so, please include this problem report. You can delete your own text from the attached returned message. The Postfix program <user@domain.com>: User unknown in virtual alias table So I know the postfix program is up and running, but for some reason it isn't accepting my message. Here's my main.cf file: Quote: # See /usr/share/postfix/main.cf.dist for a commented, more complete version smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) biff = no # appending .domain is the MUA's job. append_dot_mydomain = no # Uncomment the next line to generate "delayed mail" warnings #delay_warning_time = 4h mailbox_command = procmail -a "$EXTENSION" myhostname = mithras alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = mithras, localhost, localhost.localdomain virtual_alias_domains = domain.com, domain2.com relayhost = #mynetworks = 127.0.0.0/8 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all virtual_alias_maps = hash:/etc/postfix/virtual_mailbox.txt mynetworks_style = host #relay_domains = $mydestination unknown_local_recipient_reject_code = 450 In the /etc/postfix/virtual_mailbox.txt file, I have entries such as the following, and the permissions of the file are owned by root and are set with -rwxr--r--. The contents of the file is: Quote: # domain.com @domain.com unixuser # domain2.com @domain2.com unixuser Elsewhere I saw that the output of postfix -n is more useful, so here is the output from that command: Quote: alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases append_dot_mydomain = no biff = no config_directory = /etc/postfix inet_interfaces = all mailbox_command = procmail -a "$EXTENSION" mailbox_size_limit = 0 mydestination = mithras, localhost, localhost.localdomain myhostname = mithras mynetworks_style = host myorigin = /etc/mailname recipient_delimiter = + relayhost = smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) unknown_local_recipient_reject_code = 450 virtual_alias_domains = domain.com, domain2.com virtual_alias_maps = hash:/etc/postfix/virtual_mailbox.txt I am running Debian Sarge and the latest version of postfix. If anyone can help me get my virtual mailboxes working I would greatly appreciate it. Thanks, Shawn |
|
| Author: | pclissold [ Thu Sep 14, 2006 3:43 am ] |
| Post subject: | |
You have specified virtual_alias_maps to be a database file of type hash - but it is a text file. Code: postmap hash:/etc/postfix/virtual_mailbox.txt will produce /etc/postfix/virtual_mailbox.db which should then be referenced in your main.cf |
|
| Author: | Shawn [ Thu Sep 14, 2006 11:57 am ] |
| Post subject: | |
pclissold wrote: You have specified virtual_alias_maps to be a database file of type hash - but it is a text file. Code: postmap hash:/etc/postfix/virtual_mailbox.txt will produce /etc/postfix/virtual_mailbox.db which should then be referenced in your main.cf Actually, I tried that and it gives me the following error. It looks like the .db extension is automatically added by Postfix: Quote: Sep 14 11:35:25 localhost postfix/smtpd[2810]: fatal: open database /etc/postfix/virtual_mailbox.txt.db.db: No such file or directory
I am starting to wonder if the problem might be elsewhere. In my log file I see it trying to forward the email on to an address that looks like it's on the internet rather than localhost, so I'm going to do some more testing. If you see anything else wrong or anyone else has suggestions I would appreciate it. Thanks, Shawn |
|
| Author: | Shawn [ Thu Sep 14, 2006 2:24 pm ] |
| Post subject: | I got it working |
I'm able to accept email now, and the only change I made was to move my "main" domain name to the mydestination portion of my main.cf file. I don't know why that works, but it does. The problem seems to be that in the virtual mailboxes, it would try to forward to a local account that was giving me the fully qualified domain name for some reason, and would not find that. My "user@domain.com" address was working fine. |
|
| Page 1 of 1 | All times are UTC-04:00 |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|