[ww-devel] setting up postfix on test1.webwork.maa.org

Nathan Wallach taniwallach at gmail.com
Mon Feb 3 10:51:27 EST 2020


Usually /etc/postfix/main.cf with a "relayhost" line. Something like:

relayhost = [mailserver.domain.com]


   - http://www.postfix.org/BASIC_CONFIGURATION_README.html#relayhost


It is often informative to have a look at the data logged
in /var/log/maillog when debugging outgoing mail issues. Here are sample
log lines from a mail from tani at mathnet.technion.ac.il to
taniwallach at gmail.com. We have relayhost=[mrelay.technion.ac.il] set
nowadays.

Feb  3 14:31:45 mathnet postfix/pickup[112819]: 76EAE205BA: uid=301 from=<
> tani at mathnet.technion.ac.il>
> Feb  3 14:31:45 mathnet postfix/cleanup[113064]: 76EAE205BA: message-id=<
> DB7PR01MB42829D0D1E0A4CED2B1DA570C2000 at DB7PR01MB4282.eurprd01.prod.exchangelabs.com
> >
> Feb  3 14:31:45 mathnet postfix/cleanup[113064]: 76EAE205BA:
> resent-message-id=<
> alpine.LRH.2.21.2002031431420.112911 at mathnet.technion.ac.il>
> Feb  3 14:31:45 mathnet postfix/qmgr[62347]: 76EAE205BA: from=<
> tani at mathnet.technion.ac.il>, size=35121, nrcpt=1 (queue active)
> Feb  3 14:31:45 mathnet postfix/smtp[113232]: 76EAE205BA: to=<
> taniwallach at gmail.com>, relay=mrelay.technion.ac.il[132.68.225.14]:25,
> delay=0.24, delays=0.01/0/0.23/0.01, dsn=2.0.0, status=sent (250 ok:
>  Message 174854163 accepted)
> Feb  3 14:31:45 mathnet postfix/qmgr[62347]: 76EAE205BA: removed

<http://www.postfix.org/BASIC_CONFIGURATION_README.html#relayhost>
Here are records from longer ago (2016), when no relayhost setting was used
(from a saved log file from some debugging effort) so mails were sent
directly to the destination mail-servers based on DNS MX records:

Jun 13 20:30:41 mathnet sendmail[28335]: u5DHUfDu028335: from=<
> tani at mathnet.technion.ac.il>, size=4535, class=0, nrcpts=2, msgid=<
> alpine.LRH.2.00.1606132028360.28068 at mathnet.technion.ac.il>,
> bodytype=8BITMIME, proto=ESMTP, daemon=MTA, relay=localhost.localdomain
> [127.0.0.1]
> Jun 13 20:30:41 mathnet sendmail[28334]: u5DHUfHP028332: to=<
> user1 at techunix.technion.ac.il>,<user2 at gmail.com>, ctladdr=<
> tani at mathnet.technion.ac.il> (301/301), delay=00:00:00, xdelay=00:00:00,
> mailer=relay, pri=154380, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0,
> stat=Sent (u5DHUfDu028335 Message accepted for delivery)
> Jun 13 20:30:42 mathnet sendmail[28339]: u5DHUfDu028335: to=<
> user2 at gmail.com>, ctladdr=<tani at mathnet.technion.ac.il> (301/301),
> delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=154535, relay=
> gmail-smtp-in.l.google.com. [74.125.133.26], dsn=2.0.0, stat=Sent (ok:
>  Message 68070280 accepted)
> Jun 13 20:30:42 mathnet sendmail[28339]: u5DHUfDu028335: to=<
> user1 at techunix.technion.ac.il>, ctladdr=<tani at mathnet.technion.ac.il>
> (301/301), delay=00:00:01, xdelay=00:00:00, mailer=esmtp, pri=154535, relay=
> techunix.technion.ac.il. [132.68.1.192], dsn=2.0.0, stat=Sent (Ok: queued
> as 34E7A2A0085)
>

Back in 2017 before we set up the SPF record for mathnet, the logs had very
many entries like:

Mar 15 20:48:49 mathnet postfix/smtp[77351]: 7DBB820395: host
gmail-smtp-in.l.google.com[173.194.76.26] refused to talk to me: 421
#4.4.5 Too many connections from your host.

which all started to happen after changes made to the Technion's main SPF
record.
<https://support.google.com/a/answer/33786?hl=en>
More on SPF: https://support.google.com/a/answer/33786?hl=en

Another issue which can cause trouble is the lack of reverse DNS records:
http://stackoverflow.com/questions/35430457/sendmail-452-4-5-3-too-many-recipients

On Mon, Feb 3, 2020 at 5:18 PM mgage <gage at math.rochester.edu> wrote:

> I’ve decided to use postfix since reports are that it is easier to
> configure.
>
> I have it working in the sense that bugzilla, for example, claims that
> mail is sent off.  Also
>
> mail  gage at math.rochester.edu  or mail michaelegage at gmail.com
>
> doesn’t give any errors.  It also doesn’t deliver the mail — I never
> receive messages at either of those locations.
>
> Most likely there is some kind of spam filter (I have checked the spam
> filters on each of those sites) that is blocking mail.
>
> Where do you configure postfix to use gmail as mail relay?  That might be
> the problem or it might be something among the issues that Tani brings up.
>
> Take care,
>
> Mike
>
> On Feb 3, 2020, at 10:13 AM, Simon Park <spark at maa.org> wrote:
>
> Mike,
>
> I played around with postfix a long time ago. I believe you need to
> configure postfix/sendmail to use Gmail as a mail relay. So which email
> server are you going to use? postfix or sendmail?
>
> [image: MAA logo.PNG]
>
>
> *Simon Park*
> *IT Project Coordinator/System Administrator*
>
>
> Mathematical Association of America
> 1529 18th Street NW
> Washington DC 20036
> Direct: 202.319.8492
> www.maa.org
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.maa.org&d=DwMFaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=C6Pt5AGtImanmAdcooarL-JZO8M5dSFPfs3VweYXYkE&m=OdSIWfnfO3gsmqfjCl1kfDoX9ht1LueGWAlRHe-aUbY&s=gSZywVW22QsbnvrLJfAJgTKMC9xWNT_RZF-5elYOW38&e=>
>
>
>
>
>
>
>
>
> On Sat, Feb 1, 2020 at 10:31 PM mgage <gage at math.rochester.edu> wrote:
>
>> Hi Simon,
>>
>> Are you familiar with setting up postfix (or exim) on ubuntu?  It’s a
>> mail transport app like sendmail.
>>
>> I have step by step instructions but I suspect it will go faster if
>> someone familiar with the process does it (or watches me while I do it :-)
>> ) .
>>
>> The sendmail/postfix process on test1.webwork.maa.org
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__test1.webwork.maa.org&d=DwMFaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=C6Pt5AGtImanmAdcooarL-JZO8M5dSFPfs3VweYXYkE&m=OdSIWfnfO3gsmqfjCl1kfDoX9ht1LueGWAlRHe-aUbY&s=ODSrqJ4eylaNz5bdxalKeuKJc4FKEoZePke2xoMEamA&e=> is
>> not working properly and it is holding up installation particularly of
>> bugzilla
>> (and perhaps the other apps, mediawiki and moodle as well)
>>
>> If you haven’t installed postfix or sendmail on one of the other ubuntu
>> installations at MAA then don’t worry about it. I’ll
>> plow through the instructions.
>>
>> Thanks.
>>
>> Take care,
>>
>> Mike
>>
>>
> _______________________________________________
> webwork-devel mailing list
> webwork-devel at webwork.maa.org
> http://webwork.maa.org/mailman/listinfo/webwork-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://webwork.maa.org/pipermail/webwork-devel/attachments/20200203/5c013434/attachment-0001.html>


More information about the webwork-devel mailing list