views:

628

answers:

5

I know this isn't a help forum for this kind of problem, but i've looked everywhere for the past 5 hours trying to find a solution to this, and nothing seems to work. Hopefully someone will have run into this problem before and come up with a solution

I've got a debian server and i would like to have it serve my mail as well. I set up postfix and everything works dandy when i send mail to any account in the database, but when i want to send anything to a random email (podcast@stackoverflow for example) it throws the error

450 4.1.1 <[email protected]>: Recipient address rejected: User unknown in local recipient table

I've tried to edit the /etc/postfix/main.cf file to change smtpdrecipientsrestrictions so that it does not include rejectunauthdestination. however, with this removed, postfix stops listening on port 25 and sending mail at all becomes impossible. Any ideas to get this working?

+1  A: 

As I understand you have problems with sending mail from your postfix host (or from a host that uses your postfix host as a relayhost).

My first guess would be that you have set something wrong in either mydomains or relay_domains in postfix. What are the values of those to? They should include only your local domain in basic setups.

Zizzencs
+1  A: 

This is outrageously off-topic for this forum, but anyway.

Post output of

postconf -n

Post relevant excerpts from your mail log. Postfix by default logs to mail.* in syslog which should end up in /var/log/mail.log on Debian. To post a full log for one message, find the queueid and do a

grep <QUEUEID> /var/log/mail.log

These questions would be much better directed towards a Linux orientated, or more appropiately Postfix discussion list. The postfix-users list is pretty excellent.

Phil
+1  A: 

I suppose you are trying to connect to postfix from some other machine - do you get the same message when logged in to the server directly? Can you try sending mail through "telnet localhost 25".

Do you have permitmynetworks in smtpdrecipient_restrictions?

You might want to read http://www.postfix.org/postconf.5.html#smtpd_recipient_restrictions if you haven't done so already. Among other things, it says you "need to specify at least one of the following restrictions in smtpdrecipientrestrictions, otherwise Postfix will refuse to receive mail: reject, defer, deferifpermit, rejectunauthdestination". That seems to be the reason why postfix stopped listening when you removed rejectunauthdestination.

Marie Fischer
A: 

@Phil - Sorry, did I miss a "Stack Overflow is Windows-only" announcement? What's wrong with Linux questions?

ceejayoz
A: 

I would add that your server has to have a FQDN (fully qualified domain name) not to be rejected by some others MTA.

Aif

related questions