1

I have an PHP Forum (vanilla forums) and for its registration emails I installed Postfix. Now As I figured it out, vanilla forums uses PHPMailer for email sending procedure.
Now my questions are:

  • Is Postfix an SMTP Server? Could it fulfill the requirements that PHPMailer needs to send registration emails?

  • Should I install a separate SMTP Server for this kind jobs? (i.e scripts like PHPMailer that need SMTP Server). If yes Which SMTP Server should I install?

  • Does installing a separate SMTP Server conflict with Postfix?

  • I tried to use gmail smtp server for the job but as it turned out the new google security implementation denies any outside access to gmail smtp service. I even create an ASP application specific password and used it for this job. long story short when i logged in said email google asked for my phone Number, send me a verification code and ask me to put down new password. as google said there was an malicious attempt to access my account. – r004 Feb 13 '14 at 14:31
3

Postfix is an SMTP server and should do the job fine, no need for an extra SMTP server.

You should just have postfix deliver the emails directly to the domains involved, the users should be known there (if they are not, then drop the registration because it is fake).
In particular you should not setup a relayhost entry in /etc/postfix/main.cf unless you have relaying host that will do that for you. The latter either requires postfix to authenticate itself in some way, or it has to be a relay that can identify you (as often happens with providers of your home internet connection—they know who you are, and can take measure if you sent spam).

  • thanks; I gathered that much; without the use of any extra config when i setup postfix i don't get any error by my vanilla forums that error in sending email but still the email either doesn't send or doesn't reach the destination. I have no other idea what to do :'( – r004 Feb 13 '14 at 15:39
  • 1
    have you checked that the email has hit the mail queue? check the mail log files /var/log/mail.* (assuming something debian-ish). Also check the mailqueue using mailq – Keiran Holloway Feb 13 '14 at 16:10
  • @KeiranHolloway ; thanks for you advice i guess it hits the queue but the log file was full of errors i pasted a part of the most recent ones in pastee.org/ezbbu any ideas? – r004 Feb 14 '14 at 9:37
1

Yes, postfix is a SMTP server. But, as I can see your questions, I don't recommend to configure and use postfix (or any own SMTP) by yourself.

  • what do you mean? any solution? Why not? any software needs configuration to work properly. – r004 Feb 13 '14 at 14:47
  • 2
    I have to strongly disagree. If the people in unix.stackexchange.com shouldn't configure an SMTP server on their own, who should? Licensed and Accredited SMTP Engineers? I say go for it: there's ample docs floating around, configure it yourself and apologize to anyone who complains. – Bruce Ediger Feb 13 '14 at 17:04
  • I'm sorry, but man with question if "postfix is a smtp server", can't read docs obviously. This kind of sysadmins is perfect for spammers and other creatures. You needn't licensed SMTP engineer, but if you want a globally accessible service, you need to know what it can do. That's all. – stderr Feb 14 '14 at 14:29
1

Looking at the log files posted -- It seems you are attempting to send email to newgeek5488@gmail.com but the message is undeliverable due to the error:

delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[2a00:1450:4008:c01::1a]:25: Network is unreachable

Effectively suggesting that your machine is getting a network unreachable response when trying to establish the smtp connection to the google mail servers.

In short, this machine cannot communicate with the mail server to deliver the email.

Generally this would be caused by either a network (mis)configuration or firewall restriction. You'll either need to expose this machine to the internet (or set postfix to use a relay_host to use an intermediary mail server which will accept the email and forward it onto google.

UPDATED:

setup your machine to use your ISPs mailserver as a relayhost.. edit /etc/postfix/main.fs an add a line similar to:

relayhost = YOUR-ISPs-SMTP-SERVER

Then

postmap /etc/postfix/main.cf && service postfix reload

  • Yes; I guess that is exactly what you said; the netcat showed that my ISP blocks the outgoing port of SMTP and thus my problem. I think my only option is to buy another lowend server and run postfix there and relay my current postfix to it. but how to do that I don't know????? thanks – r004 Feb 14 '14 at 11:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.