S
S
Sergey2013-05-02 08:15:20
linux
Sergey, 2013-05-02 08:15:20

Not sending mail via sendmail

Working computer with Ubuntu 12.04. You need to test sending mail from PHP scripts. At the moment, the mail function returns 1, but the mail is not coming. The same when trying to send directly from the console.

a couple of entries from the logs
May 2 11:45:54 localhost sm-mta[16088]: r424it83016088: [email protected], size=5, class=0, nrcpts=1, msgid=<[email protected]>, proto=SMTP, daemon=MTA-v4, relay=localhost.localadmin [127.0.0.1] May 2 11:45:55 localhost sm-mta[16121]: STARTTLS=client, relay=gmail-smtp-in.l.google.com., version=TLSv1/SSLv3, verify=FAIL, cipher=ECDHE-RSA-RC4-SHA, bits=128/128 May 2 11:45:55 localhost sm-mta[16121]: r424it83016088: [email protected], delay=00:00:12, xdelay=00:00:01, mailer=esmtp, pri=120005, relay=gmail-smtp-in.l.google.com. [173.194.71.26], dsn=5.0.0, stat=Service unavailable May 2 11:45:56 localhost sm-mta[16121]: r424it83016088: r424ju83016121: DSN: Service unavailable May 2 11:46:26 localhost sm-mta[16121]: r424ju83016121: [email protected], delay=00:00:30, xdelay=00:00:30, mailer=esmtp, pri=30000, relay=test.com. [174.36.85.72], dsn=4.0.0, stat=Deferred: 451 smtp2.omkc.ru Connection timeout [174.36.85.72]
May 2 11:32:45 localhost sm-mta[15526]: r424U57U015526: [email protected], size=5, class=0, nrcpts=1, msgid=<[email protected]>, proto=SMTP, daemon=MTA-v4, relay=localhost.localadmin [127.0.0.1] May 2 11:32:46 localhost sm-mta[15615]: STARTTLS=client, relay=gmail-smtp-in.l.google.com., version=TLSv1/SSLv3, verify=FAIL, cipher=ECDHE-RSA-RC4-SHA, bits=128/128 May 2 11:33:16 localhost sm-mta[15615]: r424U57U015526: [email protected], delay=00:00:50, xdelay=00:00:31, mailer=esmtp, pri=120005, relay=gmail-smtp-in.l.google.com. [74.125.143.26], dsn=5.0.0, stat=Service unavailable May 2 11:33:16 localhost sm-mta[15615]: r424U57U015526: r424XG7U015615: DSN: Service unavailable May 2 11:33:17 localhost sm-mta[15615]: STARTTLS=client, relay=aspmx.l.google.com., version=TLSv1/SSLv3, verify=FAIL, cipher=ECDHE-RSA-RC4-SHA, bits=128/128 May 2 11:33:48 localhost sm-mta[15615]: r424XG7U015615: [email protected], delay=00:00:32, xdelay=00:00:32, mailer=esmtp, pri=30000, relay=aspmx.l.google.com. [173.194.71.26], dsn=5.0.0, stat=Service unavailable May 2 11:33:48 localhost sm-mta[15615]: r424XG7U015615: r424XG7V015615: return to sender: Service unavailable May 2 11:33:48 localhost sm-mta[15615]: r424XG7V015615: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent

, as far as I understand, the problem is in SSL / TLS. Tell me what and how to set up.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
J
J_o_k_e_R, 2013-05-02
@serega_kaktus

Are you trying to raise MTA on your home machine without a reverse resolve, valid certificates, and in general you have a hostname, as you can see from the localhost.localdomain logs? Nothing will work in our spammer-filled time. For most mail servers, especially gmail, you are a pure spammer with this configuration. Use ssmtp or something similar and smtp server provider or gmyla.

E
EugeneOZ, 2013-05-02
@EugeneOZ

Use Mandrill - easier and more reliable.

F
fuzz1on, 2013-05-02
@fuzz1on

Check /var/mail

A
antonzaycev, 2013-05-02
@antonzaycev

Check if the ports used to send mail are blocked

C
cjey, 2013-05-03
@cjey

You can configure SMTP Relay. Register a gmail account and configure sendmail so that all your mail from the work machine goes through this account. should be enough for testing.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question