Postfix not working on fresh server install

Hey !

I recently migrated to a new server, so I went for a fresh install of Virtualmin before transferring the files over from the old one.
The problem is, no mail seems to be going out of the server. Noticed it because my forum wasn’t sending out email anymore.
Tried a very basic PHP Script to send mail, to no avail.

Can anyone help me debug this and get it working ? It’s a completely fresh install with nothing fancy, I’ve never touched Postfix before, why isn’t it working? :confused:

Thanks !
Mark

Howdy,

What distro/version are you using?

Also, what happens when your forum tries to send email, are you seeing any errors? You can see email related messages/errors by checking the email logs, in either /var/log/maillog, or /var/log/mail.log.

Lastly, are you able to send email via other means, such as Usermin, RoundCube, or even a desktop client like Outlook/Thunderbird?

-Eric

Hey !

How stupid of me, completely forgot those details, it was late…

Anyways, I’m on Ubuntu 12.04, running Virtualmin 4.02.gpl GPL.

Not seeing any errors sending emails, I tried the following basic PHP script :

<?php error_reporting(E_ALL); $to = 'eternal_ps@live.com'; if(mail($to, 'Testing mail', 'This is a mailing test to see if PHP mail works.')) { echo 'Mail was sent by PHP'; } else { echo 'PHP could not send the mail'; } ?>

And the output is “Mail was sent by PHP”, but I receive no emails.

Mail.err is empty, mail.log has this in it :

Aug 31 10:36:59 ks211558 postfix/smtp[11480]: 7E29B3C131D: to=, relay=mx3.hotmail.com[65.55.37.120]:25, delay=0.71, delays=0.06/0/0.49/0.16, dsn=5.0.0, status=bounced (host mx3.hotmail.com[65.55.37.120] said: 550 SC-001 (COL0-MC4-F40) Unfortunately, messages from 188.165.214.203 weren't sent. Please contact your Internet service provider since part of their network is on our block list. You can also refer your provider to http://mail.live.com/mail/troubleshooting.aspx#errors. (in reply to MAIL FROM command)) Aug 31 10:36:59 ks211558 postfix/smtp[11480]: 7E29B3C131D: lost connection with mx3.hotmail.com[65.55.37.120] while sending RCPT TO Aug 31 10:36:59 ks211558 postfix/cleanup[11478]: 352483C134C: message-id=<20130831083659.352483C134C@ks211558.kimsufi.com> Aug 31 10:36:59 ks211558 postfix/bounce[11481]: 7E29B3C131D: sender non-delivery notification: 352483C134C Aug 31 10:36:59 ks211558 postfix/qmgr[4948]: 352483C134C: from=<>, size=2899, nrcpt=1 (queue active) Aug 31 10:36:59 ks211558 postfix/qmgr[4948]: 7E29B3C131D: removed Aug 31 10:37:05 ks211558 postfix/local[11482]: E9EB33C1321: to=, relay=local, delay=7.4, delays=0.03/0/0/7.4, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME) Aug 31 10:37:05 ks211558 postfix/qmgr[4948]: E9EB33C1321: removed Aug 31 10:37:07 ks211558 postfix/local[11500]: 352483C134C: to=, relay=local, delay=8, delays=0.02/0/0/7.9, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME) Aug 31 10:37:07 ks211558 postfix/qmgr[4948]: 352483C134C: removed

Never tried Usermin/Roundcube/others. I don’t actually need an Inbox on my server, just want to be able to send emails via PHP.

Thanks !

Howdy,

Ah, it looks like the remote servers are blocking your emails, claiming that your provider has a group of IP’s on their block list, part of which unfortunately includes your IP address.

Is your IP by chance dynamic? That could be part of the issue, as many mail servers don’t accept email originating from dynamic IP’s.

One thing you could do is to relay outgoing emails through your providers mail server, rather than trying to deliver email directly to remote servers.

To do that, you can specify your providers mail server in Webmin -> Servers -> Postfix -> General Options, and there you can set “Send outgoing mail via host”.

-Eric

But I don’t understand, it’s a server I rented from OVH (Kimsufi). Surely they are whitelisted, no ?

My IP is static. I did move my website to a new server so it will have changed, but only once.

What should I set in “Send outgoing mail via host” ?

Here’s my config http://image.noelshack.com/fichiers/2013/35/1377957473-egzaegzegzeg.png

Thanks !

You can check your IP address, to see if it’s in any spam databases:

http://www.dnsbl.info/dnsbl-database-check.php
http://whatismyipaddress.com/blacklist-check

(both of these check most of them)

I don’t understand, it’s a server I rented from OVH (Kimsufi). Surely they are whitelisted, no

Unfortunately, all I know is what the error you’re getting states… the rejection message Yahoo provided to your server says the following:

status=bounced (host mx3.hotmail.com[65.55.37.120] said: 550 SC-001 (COL0-MC4-F40) Unfortunately, messages from 188.165.214.xxx weren’t sent. Please contact your Internet service provider since part of their network is on our block list. You can also refer your provider to http://mail.live.com/mail/troubleshooting.aspx#errors.

It’s possible that the previous owner of your IP address managed to get themselves blacklisted.

However, what they mention is that it’s a block of IP’s that’s an issue… that may mean that there’s been a lot of spam originating from your provider.

You may want to talk to your provider about why it’s a problem.

As far as what to put into “Send outgoing mail via host” – many providers offer a mail relay server. If your provider has one, you could try putting it there to see if that resolves the issue.

I don’t know what the mail relay server would be though, you’d need to talk to them about that.

-Eric