Postfix as a mail delivery server fails (status bounced loops back to myself)
I'm trying to configure my Postfix server as a delivery agent for the server. From studying the Postfix documentation it appears that the feature for this is virtual_alias_domains and virtual_alias_maps.
I created a virtual hash file. No matter what I do with the virtual access the system will interpret the address as local and send the email to the local system, not the specified domain. I know that the Postfix server can find the domain because a mail test with the virtual setup removed will send the mail to the proper machine. /etc/postfix/main.cf: Code:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version Code:
apollo3.com ignore_this_line Code:
echo "test" | mail -s "test subject" ljames@apollo3.com Code:
Jul 15 17:15:10 ubuntuserver postfix/pickup[10001]: 23D2FDFC6D: uid=1002 from=<ljames> I also tried: /etc/postfix/virtual.db: Code:
apollo3.com ignore_this_line Code:
Jul 15 17:20:05 ubuntuserver postfix/pickup[10164]: 84324DFC6D: uid=1002 from=<ljames> /etc/postfix/main.cf Code:
# ----------- Virtual Block ---------------------------- Code:
Jul 15 17:24:58 ubuntuserver postfix/master[10309]: daemon started -- version 2.8.2, configuration /etc/postfix I'm running the Ubuntu 11.04 server. The postfix installation is from the distro repository. Thanks in advance for anyone who has any insight one this. -- L. James -- L. D. James ljames@apollo3.com www.apollo3.com/~ljames |
Just checking ...
Quote:
|
Quote:
-- L. James -- L. D. James ljames@apollo3.com www.apollo3.com/~ljames |
Cool, I'm guessing that you're sending the test email from the mail server itself, and $myorigin is the same as $myhostname ?
Quote:
|
Quote:
Some people appeared to have success with that particular example. Take a look at: http://www.sysdesign.ca/guides/postfix_virtual.html I saw this repeated many times. But of course I pointed out in my original text that I tried both. I also removed "apollo3.com" from the variables you mentioned and that didn't help. If you look at the code/quote where you took that from you'll see the first line has "apollo3.com". It appeared that the virtual map would use a domain block and convert the name without a domain to the domain in that block. I thought that was the purpose of the first line in the block. Also if you look at the main.cf file the options there is also indicating apollo3.com as a specific domain: Code:
# ----------- Virtual Block ---------------------------- My objective is to have the server send the mail to the specified domain. I'm trying all the examples that I can find from all the documentation I can find to get it to work. I started over a number of times with a default main.cf. I follow every example I can find on the Postfix support site and the distro support site. The results so far is consistent. Every variation consistently comes back to Postfix trying to figure in a local delivery (again, even when none of the variable point to apollo3.com as local) or just fails to deliver. Thanks again for your input! -- L. James -- L. D. James ljames@apollo3.com www.apollo3.com/~ljames |
Code:
My objective is to have the server send the mail to the specified domain What exactly are you trying to do? .. forward mail for a local user to a remote user? Your /etc/postfix/virtual config indicates that you're trying to send mail destined for ljames@apollo3.com to the local user ljames, is this correct ? |
Quote:
I believe the mail server is something referred to as a backup/cache server. It has an mx record in the apollo3.com records. I actually have 300 names in the virtual map file. The purpose of the virtual map file is to stop the mail at the delivery server rather than caching it, then allowing apollo3.com to bounce it. So the virtual map is serving as an immediate reject flag for spammers who might try sending every name in the dictionary to apollo3.com. The example excerpt of ljames@apollo3.com/ljames is an example for the test. The virtual file is actually more fully populated. It's my experience that the backup server doesn't do an mx lookup. It just delivers the mail where it's told. Other servers does an mx look up to see where to send the mail for a domain. If one mx machine isn't available it'd proceed to the next one in line. I'm trying to put the Postfix server as the main one in the line. By the way, when Postfix sees the mx record, it actually sees itself since I want it to be the main mx server. -- L. James -- L. D. James ljames@apollo3.com www.apollo3.com/~ljames |
Have you read this one yet? http://www.postfix.org/STANDARD_CONF...ME.html#backup
|
Quote:
Code:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version As you see I have lots of entries and commented out test. I'm immediately being bombarded with spam until I get the dnsbl's working. I believe the list I have commented out is old. I'm in the process of investigating them... but of course that's a subject for another thread. Again, looking at the description of your link, I'm sure it's going to work perfect for this immediate application. I really appreciate your taking the time to understand what I was looking for and to research. -- L. James -- L. D. James ljames@apollo3.com www.apollo3.com/~ljames |
All times are GMT -5. The time now is 05:21 PM. |