> I take it your mail provider uses Postfix and you claim it messes up?

I never said what server software my ESP¹ uses. My mention of postfix
referred to my own local host. I run postfix locally but it is not
WAN-facing (thus all inbound mail is by fetchmail grabbing from pop3
servers).

¹ESP: email service provider

But incidentally, you are correct. My ESP in fact also uses
postfix. And they use the default setting, as you suggest:

> The postconf(5) manual page (command: man 5 postconf) states:
> 
> > empty_address_recipient (default: MAILER-DAEMON)
> 
> So that's upstream business, they have the means to make that valid --
> and not fetchmail's business to fix.

Indeed. It’s a bit surprising postfix would default to an RFC
non-compliant value. And I suppose the take-away there is that my ESP
is not doing something unusual, which means this scenario is more
common than ideal.

> Are you using multidrop? =>
> <https://www.fetchmail.info/fetchmail-FAQ.html#G3>

$ env LC_ALL=C fetchmail -V | grep -i drop

^ this indicates single-drop mode is used for all my configs.

> So please provide fetchmail -vv logs.

To reproduce this, I had to attempt to send an oversized message to
the same recipient as that of august last year. Luckily the same
server limits are in place and nothing changed (which means my ESP has
not fixed the problem on their end that I reported [annoying] -- but
that actually benefits this reproduction to get more detailed logs).

===8<----------------------------------------
fetchmail: Trying to connect to 127.0.0.1/13552...connected.
fetchmail: POP3< +OK [XCLIENT] howdy, ready.
fetchmail: POP3> CAPA
fetchmail: POP3< +OK
fetchmail: POP3< CAPA
fetchmail: POP3< TOP
fetchmail: POP3< UIDL
fetchmail: POP3< RESP-CODES
fetchmail: POP3< PIPELINING
fetchmail: POP3< AUTH-RESP-CODE
fetchmail: POP3< STLS
fetchmail: POP3< USER
fetchmail: POP3< SASL PLAIN LOGIN
fetchmail: POP3< .
fetchmail: 127.0.0.1: WARNING: server offered STLS, but sslproto '' given.
fetchmail: POP3> USER manny
fetchmail: POP3< +OK
fetchmail: POP3> PASS *
fetchmail: POP3< +OK Logged in.
fetchmail: selecting or re-polling default folder
fetchmail: POP3> STAT
fetchmail: POP3< +OK 1 4567
fetchmail: 1 message for manny at mannysESP-onion (4567 octets).
fetchmail: POP3> LIST 1
fetchmail: POP3< +OK 1 4567
fetchmail: POP3> RETR 1
fetchmail: POP3< +OK 4567 octets
fetchmail: reading message manny@127.0.0.1:1 of 1 (4567 octets)About to rewrite 
Return-Path: <MAILER-DAEMON>...
...rewritten version is Return-Path: <MAILER-DAEMON@127.0.0.1>.
fetchmail: About to rewrite From: mailer-dae...@mx0.mannysesp.net (Mail 
Delivery System)...
...rewritten version is From: mailer-dae...@mx0.mannysesp.net (Mail Delivery 
System).
fetchmail: About to rewrite To: myal...@mannysesp.net...
...rewritten version is To: myal...@mannysesp.net.
fetchmail: Trying to connect to ::1/25...connected.
fetchmail: SMTP< 220 gudrun ESMTP Postfix (Debian/GNU)
fetchmail: SMTP> EHLO mannys.host
fetchmail: SMTP< 250-gudrun
fetchmail: SMTP< 250-PIPELINING
fetchmail: SMTP< 250-SIZE 40960000
fetchmail: SMTP< 250-VRFY
fetchmail: SMTP< 250-ETRN
fetchmail: SMTP< 250-ENHANCEDSTATUSCODES
fetchmail: SMTP< 250-8BITMIME
fetchmail: SMTP< 250-DSN
fetchmail: SMTP< 250-SMTPUTF8
fetchmail: SMTP< 250 CHUNKING
fetchmail: forwarding to localhost
fetchmail: SMTP> MAIL FROM:<MAILER-DAEMON@127.0.0.1> BODY=8BITMIME SIZE=4567
fetchmail: SMTP< 501 5.1.7 Bad sender address syntax
fetchmail: SMTP error: 501 5.1.7 Bad sender address syntax
fetchmail: SMTP> RSET
fetchmail: SMTP< 250 2.0.0 Ok
fetchmail:  not flushed
fetchmail: POP3> QUIT
fetchmail: POP3< +OK Logging out.
fetchmail: SMTP> QUIT
fetchmail: SMTP< 221 2.0.0 Bye
fetchmail: 6.4.37 querying mannysESP-onion (protocol POP3) at Wed 22 Jan 2025 
02:22:22 PM CET: poll completed
fetchmail: New UID list from mannysESP-onion:
 <empty>
fetchmail: not swapping UID lists, no UIDs seen this query
===8<----------------------------------------

I should also elaborate on this line to clear up confusion:

  reading message manny@127.0.0.1:1 of 1 (4567 octets)About to rewrite 
Return-Path: <MAILER-DAEMON>...

That looks as if the ESP is my localhost. But it’s not. There is a
fetchmail limitation (unless I’m wrong) that fetchmail cannot handle
onion hosts. So I have this config stanza:

===8<----------------------------------------
skip mannysESP-onion via 127.0.0.1
        protocol       pop3
        port           13552
        username       "manny"
        sslproto       ''
        fetchall
===8<----------------------------------------

So running fetchmail is complicated. I run fetchmail this way:

===8<----------------------------------------
$ socat TCP4-LISTEN:13552,reuseaddr,fork 
SOCKS4A:127.0.0.1:ungodlyverylongassonionversion3hostnamehere.onion:110,socksport=9050
 &
$ local pid=$!
$ fetchmail -d0 mannysESP-onion
$ kill "$pid"
===8<----------------------------------------

Fetchmail thinks it’s fetching from a local server, but
127.0.0.1:13552 is actually the end of a tunnel over Tor to an onion
host.  Hmm.. I just realized that may be why fetchmail decides to
append @127.0.0.1 to MAILER-DAEMON.

Reply via email to