Discussion:
Postfix seems to deliver mail and then remove it
(too old to reply)
Bernard T. Higonnet
2014-12-09 07:02:31 UTC
Permalink
System FreeBSD 8.3-RELEASE FreeBSD 8.3-RELEASE #0
Postfix version 2.9.1


After screwing up a working postfix server (by erasing main.cf and
various tables and then restoring out-of-date backups...) I find that
incoming mail is seemingly "(delivered to maildir)" and then removed
from same! Here is a log snippet to illustrate what I mean:

Dec 9 07:11:23 freebsd postfix/qmgr[20416]: 62015C382F:
from=<***@gmail.com>, size=1888, nrcpt=2 (queue active)

Dec 9 07:11:23 freebsd postfix/local[20502]: 62015C382F:
to=<***@higonnet.net>, relay=local, delay=0.17, delays=0.15/0.02/0/0,
dsn=2.0.0, status=sent (delivered to maildir)

Dec 9 07:11:23 freebsd postfix/local[20502]: 62015C382F:
to=<***@higonnet.net>, relay=local, delay=0.17,
delays=0.15/0.02/0/0, dsn=2.0.0, status=sent (delivered to maildir)

Dec 9 07:11:23 freebsd postfix/qmgr[20416]: 62015C382F: removed


The intended recipient is ***@higonnet.net in the 2nd line. The 3rd line
is a copy sent to a journal in which I place all copies of all incoming mail

The mail never shows up in ***@higonnet.net's Maildir, presumably as a
result of the action logged in the 4th line "removed"

The copy placed in the journal's Maildir behaves as expected: it's there.

Apart from the fact I have only the vaguest ideas about postfix queues
(mails entering and re-entering different queues etc.), I find it
astonishing that postfix would ever go to maildir and remove something
it put there!

Looking at it more closely, the 4th line probably is trying to tell me
that the mail is no longer in the active queue and indicates postfix has
finished with this mail.

It occurs to me that mail ostensibly delivered to ***@higonnet.net in
the 2nd line is probably going somewhere else than the right place?

I hope this makes some sense to someone who can explain why I'm making
postfix behave this way.

TIA
Bernard Higonnet
Viktor Dukhovni
2014-12-09 07:12:53 UTC
Permalink
I find that incoming mail
is seemingly "(delivered to maildir)" and then removed from same! Here is a
No, the delivered mail is NOT removed, the queue-file is removed once all
envelope recipients are delivered or bounced.
dsn=2.0.0, status=sent (delivered to maildir)
delays=0.15/0.02/0/0, dsn=2.0.0, status=sent (delivered to maildir)
Now you just need to find out where your local per-user maildirs are.

http://www.postfix.org/DEBUG_README.html#mail
--
Viktor.
LuKreme
2014-12-09 07:44:46 UTC
Permalink
Post by Bernard T. Higonnet
delays=0.15/0.02/0/0, dsn=2.0.0, status=sent (delivered to maildir)
Dec 9 07:11:23 freebsd postfix/qmgr[20416]: 62015C382F: removed
This is perfectly normal, and if you look t the services that are login, it’s pretty clear.

Postfix/local delivers the mail. The qmgr removes the “62015C382F" queue file.

You need to figure out where the maildir is. In a pinch, you can search your disk for files containing “62015C382F” since that queue ID will be in the received header.

Received: from russian-caravan.cloud9.net (russian-caravan.cloud9.net [168.100.1.4])
by mail.covisp.net (Postfix) with ESMTPS id 06FF450D33D

So, for me I could grep for files containing “mail.covisp.net*[QUID]"
--
You know a thorn can main / But a lover does the same / A gem will
reflect light / And a Fool will marvel at the sight / A fool such as me,
/Who sees not the gold, but the beauty of the shine
James B. Byrne
2014-12-09 19:45:49 UTC
Permalink
Post by Bernard T. Higonnet
System FreeBSD 8.3-RELEASE FreeBSD 8.3-RELEASE #0
Postfix version 2.9.1
After screwing up a working postfix server (by erasing main.cf and
various tables and then restoring out-of-date backups...) I find that
incoming mail is seemingly "(delivered to maildir)" and then removed
This will not fix your current problem but for future experiments I suggest
that you first install and initialise: etckeeper.
--
*** E-Mail is NOT a SECURE channel ***
James B. Byrne mailto:***@Harte-Lyne.ca
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3
l***@gmail.com
2016-12-10 14:04:40 UTC
Permalink
Post by James B. Byrne
Post by Bernard T. Higonnet
System FreeBSD 8.3-RELEASE FreeBSD 8.3-RELEASE #0
Postfix version 2.9.1
After screwing up a working postfix server (by erasing main.cf and
various tables and then restoring out-of-date backups...) I find that
incoming mail is seemingly "(delivered to maildir)" and then removed
This will not fix your current problem but for future experiments I suggest
that you first install and initialise: etckeeper.
--
*** E-Mail is NOT a SECURE channel ***
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3
jbhygy

Loading...