Ougoing SMF forum mail being rejected

Check SMF forum configuration since webmin and console works must mean that the forum config needs fixing.

1 Like

There are only two options:
PHP(default)
SMTP

Current Settings:
Mail type : (PHP default)
SMTP server :
SMTP port : 25
SMTP username
SMTP password
(confirm)

This setting allows you to choose either PHPā€™s default settings, or to override those settings with SMTP. PHP doesnā€™t support using authentication with SMTP (which many hosts require, now) so if you want that you should select SMTP. Please note that SMTP can be slower, and some servers will not take usernames and passwords.

You donā€™t need to fill in the SMTP settings if this is set to PHPā€™s default.

I though of trying SMTP, but which server do I put in there?
myDomain.com OR
Office.myDomain.com OR
rocky-86.office.myDomain.com OR
what?

Hi,

If you use php, I would double check the sendmail_path is correct in php.ini (normally located /etc/php.ini).

Thanks Tom.

I would use smtp over php since it can be problematic. If you do use smtp then you dont need sendmail locally. All my joomla installs use smtp instead of php.

You put in the name of your server so tsgw1 or whatever it is called.

1 Like

Nope, tried it, mail still vanishes. Itā€™s not in the mqueue and the only indication in maillog is the word failed.

tried which? php or smtp?

Both, but I guess I donā€™t know enough about sendmail to be able to fix it. Hereā€™s an exerp from the mailog, it doesnā€™t mean a lot to me Iā€™m afraid.

Aug 06 21:31:06 rocky-86 sendmail[781452]: 276JV5AA781452: from=apache@rocky-86.office.myDomain.com, size=825, class=0, nrcpts=1, msgid=202208061931.276JV5vw781451@rocky-86.office.myDomain.com, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Aug 06 21:31:12 rocky-86 sendmail[781455]: STARTTLS=client, relay=mail.protonmail.ch., version=TLSv1.3, verify=FAIL, cipher=TLS_AES_256_GCM_SHA384, bits=256/256
Aug 06 21:31:13 rocky-86 sendmail[781455]: 276JV5AA781452: to=user.name@protonmail.com, ctladdr=apache@rocky-86.office.myDomain.com (48/48), delay=00:00:08, xdelay=00:00:07, mailer=esmtp, pri=120825, relay=mail.protonmail.ch. [185.70.42.128], dsn=2.0.0, stat=Sent (Ok: queued as 4M0XdD3cvgz9vNPN)

Looks like it was sent means it left the queue and your server. Maybe in spam folder in protonmail. If not or no return email for reason of delivery faiure it will be impossible to solve. Had you sent via your email server instead using smtp then it would have returned to the senders mailbox with an error and then it would be possible to solve.

Using sendmail on the SMF server doesnt allow that stage of diagnosis to occur. Therefore configure smtp in smf server to use tsgw1 instead of sendmail. Otherwise we cannot help further.

Hi,

I suggest asking protonmail support what happened to message ID 4M0XdD3cvgz9vNPN, if it isnā€™t junk.

Regards Tom.

If the email is being sent using standard Rocky php infrastructure (including sendmail), itā€™s worth creating a 10 line php CLI script to test it. Itā€™s not clear to me if you are saying the mail is bouncing, or if itā€™s just disppearing? It doesnā€™t help with the over obfuscation of the logs. One thing I can see straight away is where it says ā€œfrom apache@rocky-86ā€¦ā€, most upstream hosts would reject this becuase itā€™s not a real from address, but in that case it should bounce backā€¦

1 Like

It MAY bounce back, but it takes time.

I did try configuring SMF, to send to port 25 on my mailserver, but that does the same thing - vanishes.

Hi,

According to the last log snippit you posted, protonmail accepted it for delivery. Have you contacted their support?

Regards Tom.

Asking is easy, waiting for a reply - takes time. Not like itā€™s urgent. I have patience.

1 Like

Iā€™ve found the problem, (but I donā€™t know how to fix it).

In sendmail.mc I have Masquerade _as set to myDomain.com

For some reason, all outgoing mail has the From field as user@office.myDomain.com. Never gets delivered to protonmail. If I create a mail in webmin and chage the From: manually to user@myDomain.com, it works fine.

Must be something in the later version of sendmail I reckon. the CentOS 7.3 version never gave a problem.

Must be something wrong or missing in sendmail.mc, but what?

Hi,

This may help:

Regards Tom.

1 Like

I checked, itā€™s setup correctly.

I rotated the logfile and sent 2 more mails from SMF

Aug 9 22:39:15 rocky-86 sendmail[897885]: 279KdFM4897885: from=apache, size=583, class=0, nrcpts=1, msgid=202208092039.279KdFM4897885@rocky-86.office.myDomain.com, relay=apache@localhost
Aug 9 22:39:15 rocky-86 sendmail[897885]: 279KdFM4897885: to=user1@protonmail.com, ctladdr=apache (48/48), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30583, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]

Aug 9 22:39:37 rocky-86 sendmail[897887]: 279KdbqK897887: from=apache, size=594, class=0, nrcpts=1, msgid=202208092039.279KdbqK897887@rocky-86.office.myDomain.com, relay=apache@localhost

Aug 9 22:39:37 rocky-86 sendmail[897887]: 279KdbqK897887: to=user1@protonmail.com, ctladdr=apache (48/48), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30594, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]

Sending from the command line works perfectly. as well as from webmin. Everything is masqueraded as myDomain.com.

It worked fine on CentOS 7

Hi,

Now sendmail is refusing the connection. Its not really clear that why.

At this I would try iwalkerā€™s suggestion:

Regards Tom.

Itā€™s worth checking that sendmail is listening on the sending host e.g.
ss -ntl
check the service is running, and if itā€™s not, why did it stop?

Nope, didnā€™t work, it actually made things MUCH worse, because then ALL mail came out from rocky-86@office.myDomain.com

Nereā€™s the header from the undelivered mail:

Return-Path: <>
X-Original-To: MyName@protonmail.com
Delivered-To: MyName@protonmail.com
Received: from TSMAIL1.office.myDomain.com (unknown [99.999.999.999]) by
mailin029.protonmail.ch (Postfix) with ESMTP id 4M30P82k0Fz9vNPS for
MyName@protonmail.com; Wed, 10 Aug 2022 19:29:16 +0000 (UTC)
Received: from NTD-MTA by TSMAIL1.office.myDomain.com with Novell_GroupWise;
Wed, 10 Aug 2022 21:29:10 +0200
Authentication-Results: mailin029.protonmail.ch; arc=none smtp.remote-ip=99.999.999.999
Authentication-Results: mailin029.protonmail.ch; dkim=none
Authentication-Results: mailin029.protonmail.ch; spf=none
smtp.helo=TSMAIL1.office.myDomain.com
Authentication-Results: mailin029.protonmail.ch; dmarc=none (p=none dis=none)
header.from=TSMAIL1.office.myDomain.com
Message-Id: s2f42326.006@TSMAIL1.office.myDomain.com
X-Mailer: Novell GroupWise Internet Agent 9.9.9
Date: Wed, 10 Aug 2022 21:29:10 +0200
From: Mailer-Daemon@TSMAIL1.office.myDomain.com
To: MyName@protonmail.com
Subject: Message status - undeliverable
Mime-Version: 1.0
Content-Type: text/plain
X-Rspamd-Queue-Id: 4M30P82k0Fz9vNPS
X-Spamd-Result: default: False [4.95 / 25.00]; HFILTER_HOSTNAME_UNKNOWN(2.50);
MIME_MA_MISSING_HTML(1.00); AUTH_NA(1.00); MV_CASE(0.50);
RCVD_NO_TLS_LAST(0.10);
MIME_GOOD(-0.10)[multipart/mixed,text/plain,multipart/alternative];
BOUNCE(-0.05)[mailer-daemon+subj]; R_SPF_NA(0.00)[no SPF record]; R_DKIM_NA(0.00);
MIME_TRACE(0.00)[0:+,1:+,2:~,3:+,4:+]; FROM_NO_DN(0.00); ASN(0.00)[asn:9031,
ipnet:85.234.192.0/19, country:BE]; TO_MATCH_ENVRCPT_ALL(0.00);
NEURAL_SPAM(0.00)[0.786]; RCVD_COUNT_TWO(0.00)[2]; SUBJ_BOUNCE_WORDS(0.00);
ARC_NA(0.00); TO_DN_NONE(0.00); RCPT_COUNT_ONE(0.00)[1];
DMARC_NA(0.00)[myDomain.com]; MID_RHS_MATCH_FROM(0.00)