Merge lp:~hloeung/langpack-o-matic/ssmtp-misconfigured into lp:langpack-o-matic

Proposed by Haw Loeung
Status: Work in progress
Proposed branch: lp:~hloeung/langpack-o-matic/ssmtp-misconfigured
Merge into: lp:langpack-o-matic
Diff against target: 15 lines (+0/-8)
1 file modified
charms/xenial/langpack-o-matic/hooks/install (+0/-8)
To merge this branch: bzr merge lp:~hloeung/langpack-o-matic/ssmtp-misconfigured
Reviewer Review Type Date Requested Status
Sebastien Bacher Needs Information
Review via email: mp+408000@code.launchpad.net

Commit message

Remove ssmtp configuration

It's wrong, it misconfigures ssmtp causing undeliverable mail and
adding to mail logs noise.

Description of the change

Luckily, I have access to inspect the unit and there's no mail successfully delivered:

ubuntu@juju-prod-ues-langpack-machine-1:~$ zgrep -v 'Recipient address rejected: User unknown in local recipient table' /var/log/mail.log /var/log/mail.log.1 /var/log/mail.log.2.gz
/var/log/mail.log:Sep 2 01:15:03 juju-prod-ues-langpack-machine-1 sSMTP[32719]: Sent mail for root@localhost (221 2.0.0 Bye) uid=0 username=root outbytes=667
/var/log/mail.log.1:Aug 25 08:17:08 juju-prod-ues-langpack-machine-1 sSMTP[20904]: Unable to connect to "mx.canonical.com" port 25.
/var/log/mail.log.1:Aug 25 08:17:08 juju-prod-ues-langpack-machine-1 sSMTP[20904]: Cannot open mx.canonical.com:25
ubuntu@juju-prod-ues-langpack-machine-1:~$

To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for the report

charms/xenial/langpack-o-matic/hooks/start

sets <email address hidden> in the crontab, shouldn't it lead to a valid email being used?

review: Needs Information
Revision history for this message
Haw Loeung (hloeung) wrote :

On Wed, Oct 20, 2021 at 03:37:43PM -0000, Sebastien Bacher wrote:
> charms/xenial/langpack-o-matic/hooks/start
>
> sets <email address hidden> in the crontab, shouldn't it lead to a valid email being used?

Nope, that's setting the recipient address. You can check your
mailbox, you're not receving these emails. They're bouncing and coming
to us.

An example of one that came just recently:

| https://pastebin.canonical.com/p/8hJ3FtdT6h/

Revision history for this message
Haw Loeung (hloeung) wrote :

I'll mark this as WIP, will have a play around with getting a working ssmtp config going.

Revision history for this message
Sebastien Bacher (seb128) wrote :

thanks!

Unmerged revisions

595. By Haw Loeung

Remove ssmtp configuration

It's wrong, it misconfigures ssmtp causing undeliverable mail and
adding to mail logs noise:

| Sep 2 01:15:02 seviper postfix/smtpd[6486]: NOQUEUE: reject_warning: RCPT from ...: 504 5.5.2 <localhost>: Helo command rejected: need fully-qualified hostname; from=<root@localhost> to=<ubuntu@localhost> proto=SMTP helo=<localhost>
| Sep 2 01:15:02 seviper postfix/smtpd[6486]: NOQUEUE: reject_warning: RCPT from ...: 504 5.5.2 <ubuntu@localhost>: Recipient address rejected: need fully-qualified address; from=<root@localhost> to=<ubuntu@localhost> proto=SMTP helo=<localhost>
| Sep 2 01:15:02 seviper postfix/smtpd[6486]: NOQUEUE: reject_warning: RCPT from ...: 504 5.5.2 <root@localhost>: Sender address rejected: need fully-qualified address; from=<root@localhost> to=<ubuntu@localhost> proto=SMTP helo=<localhost>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'charms/xenial/langpack-o-matic/hooks/install'
2--- charms/xenial/langpack-o-matic/hooks/install 2016-11-18 10:44:04 +0000
3+++ charms/xenial/langpack-o-matic/hooks/install 2021-09-02 01:29:31 +0000
4@@ -23,11 +23,3 @@
5 make -C langpack-o-matic/bin
6 EOF
7
8-juju-log "Configuring ssmtp"
9-mx="$(host -t MX ubuntu.com | sed 's/^.* //; s/\.$//')"
10-cat <<EOF > /etc/ssmtp/ssmtp.conf
11-root=ubuntu
12-mailhub=$mx
13-hostname=localhost
14-FromLineOverride=YES
15-EOF

Subscribers

People subscribed via source and target branches

to all changes: