Jump to content

Postfix problem


johanl
 Share

Recommended Posts

Well now my server accepts SMTP connections, only Postfix doesn't really know what to do with it... When I try to send an email to myself from my office, this is what comes into my root mailbox:

 

Out: 220 ravenrealm.demon.nl ESMTP Postfix (20010228)
In: EHLO mail.xxx-xxx.nl
Out: 250-ravenrealm.demon.nl
Out: 250-PIPELINING
Out: 250-SIZE 10240000
Out: 250-VRFY
Out: 250-ETRN
Out: 250 8BITMIME
In: MAIL FROM:<johan.xxxxxxx@xxx.com> SIZE=1361
Out: 250 Ok
In: RCPT TO:<johan@ravenrealm.net>
Out: 451 <johan@ravenrealm.net>: Temporary lookup failure
In: QUIT
Out: 221 Bye

 

Here's a link to my main.cf...

main.cf

Edited by johanl
Link to comment
Share on other sites

Hi Johan, the error below means that there was an error when looking up the domain ravenrealm.net.

Out: 451 <johan@ravenrealm.net>: Temporary lookup failure

 

Modify your main.cf file to do the following:

 

tell it to handle mail for the domain:

$mydomain = yourdomain.com

 

tell the machine to handle incoming mail for that domain:

//uncomment this line...
mydestination = $myhostname, localhost.$mydomain $mydomain

 

Also, to speed up lookups when the machine is local, add the domain to your hosts file (*nix first looks up domains from hosts, then DNS by default):

127.0.0.1              yourdomain.com

 

reload postfix:

postfix reload or /etc/rc.d/init.d/postfix restart

 

Regards,

 

Armond

Link to comment
Share on other sites

Thanks for your help so far, it didn't make a difference yet though. I deleted all the (standard) comment from the main.cf, maybe you can take another look it's easier to read now.

Link to comment
Share on other sites

Hey Johan,

 

your postfix conf looks good.

 

Firstly, are you connecting to this server directly? In other words, are you sending mail straight to this server via your mail client? If you are, then on to the next question, if you're not, then test by setting your mail client to connect to the mail server directly, or ensure that you have your MX records set up correctly (DNS MX records tell mail from the world to what server mail for a domain must be routed to, and in what order/priority).

 

Second, have you set up an account for your mail recipient? Postfix Mail users can be real (adduser) or virtual (by adding a virtusertable). For your requirements, creating a standard linux user would suffice. Remember, adding a user bob would make that users mail address bob@host.domain.com, so unless your hostname happens to be yourdomain.com, mail to bob@yourdomain.com will only work if correctly set up in Postfix (which in your case it is). Speed things up by adding yourdomain.com into your /etc/hosts file.

 

We want to test SMTP, so enter the following at a command prompt...

echo "Hello World" | mail bob@yourdomain.com -s "this is a test"

This will send a mail to bob@yourdomain.com.

Check the logs

tail -f /var/log/mail/errors /var/log/mail/warnings /var/log/mail/info

 

Lemme know what the outcome is.

 

Regards,

Armond

Link to comment
Share on other sites

Well I tried so many things but it kept not-working, so I removed Postfix and re-installed it again, adjusted the main.cf somewhat and voila..it works!

Thanks for the help.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...