Skip to content

Question: How to configure devnull with catch-all and "subaddress"-catchall #2948

@worldworm

Description

@worldworm

I followed #1335 and this and mails are moved to devnull.

Just to repeat the config (this works):

$ cat postfix-aliases.cf
devnull:    /dev/null

$ cat postfix-virtual.cf 
@domain.tld [email protected]
[email protected] devnull
Logs
mailserver  | Dec 22 18:27:57 mail postfix/smtpd[1695]: connect from sender.server.tld[ip-removed]
mailserver  | Dec 22 18:27:57 mail postfix/smtpd[1695]: Anonymous TLS connection established from sender.server.tld[ip-removed]: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256
mailserver  | Dec 22 18:27:57 mail policyd-spf[1697]: prepend Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=ip-removed; helo=sender.server.tld; [email protected]; receiver=<UNKNOWN> 
mailserver  | Dec 22 18:27:57 mail dovecot: auth: passwd-file([email protected]): unknown user 
mailserver  | Dec 22 18:27:57 mail postfix/smtpd[1695]: 6541888265D: client=sender.server.tld[ip-removed]
mailserver  | Dec 22 18:27:57 mail postfix/cleanup[1698]: 6541888265D: message-id=<[email protected]>
mailserver  | Dec 22 18:27:57 mail opendkim[490]: 6541888265D: sender.server.tld [ip-removed] not internal
mailserver  | Dec 22 18:27:57 mail opendkim[490]: 6541888265D: not authenticated
mailserver  | Dec 22 18:27:57 mail postfix/qmgr[1229]: 6541888265D: from=<[email protected]>, size=8216, nrcpt=1 (queue active)
mailserver  | Dec 22 18:27:57 mail postfix/smtpd[1695]: disconnect from sender.server.tld[ip-removed] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 commands=7
mailserver  | Dec 22 18:27:58 mail postfix/smtpd-amavis/smtpd[1705]: connect from localhost[127.0.0.1]
mailserver  | Dec 22 18:27:58 mail postfix/smtpd-amavis/smtpd[1705]: 5741C88266C: client=localhost[127.0.0.1]
mailserver  | Dec 22 18:27:58 mail postfix/cleanup[1698]: 5741C88266C: message-id=<[email protected]>
mailserver  | Dec 22 18:27:58 mail postfix/qmgr[1229]: 5741C88266C: from=<[email protected]>, size=8447, nrcpt=1 (queue active)
mailserver  | Dec 22 18:27:58 mail amavis[1246]: (01246-01) Passed CLEAN {RelayedOpenRelay}, [ip-removed]:59751 [ip-removed] <[email protected]> -> <[email protected]>, Queue-ID: 123, Message-ID: <[email protected]>, mail_id: VM3qI3kUjnum, Hits: 2.399, size: 8225, queued_as: 5741C88266C, 755 ms
mailserver  | Dec 22 18:27:58 mail postfix/local[1706]: 5741C88266C: to=<[email protected]>, relay=local, delay=0.01, delays=0.01/0.01/0/0, dsn=2.0.0, status=sent (delivered to file: /dev/null)
mailserver  | Dec 22 18:27:58 mail postfix/qmgr[1229]: 5741C88266C: removed
mailserver  | Dec 22 18:27:58 mail postfix/smtp-amavis/smtp[1699]: 6541888265D: to=<[email protected]>, orig_to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.1, delays=0.32/0.01/0.01/0.75, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 5741C88266C)
mailserver  | Dec 22 18:27:58 mail postfix/qmgr[1229]: 6541888265D: removed

BUT, because my mailserver runs under mail.domain.tld, i need an additional catchall here:
Now it no longer works and mails to [email protected] are send to [email protected]

Config (this does not work):

$ cat postfix-aliases.cf
devnull:    /dev/null

$ cat postfix-virtual.cf 
@domain.tld [email protected]
@mail.domain.tld [email protected]
[email protected] devnull
Logs
mailserver  | Dec 22 18:37:20 mail postfix/smtpd[1361]: connect from sender.server.tld[ip-removed]
mailserver  | Dec 22 18:37:20 mail postfix/smtpd[1361]: Anonymous TLS connection established from sender.server.tld[ip-removed]: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256
mailserver  | Dec 22 18:37:20 mail policyd-spf[1367]: prepend Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=ip-removed; helo=sender.server.tld; [email protected]; receiver=<UNKNOWN> 
mailserver  | Dec 22 18:37:20 mail dovecot: auth: passwd-file([email protected]): unknown user 
mailserver  | Dec 22 18:37:20 mail postfix/smtpd[1361]: 66D3788265D: client=sender.server.tld[ip-removed]
mailserver  | Dec 22 18:37:20 mail postfix/cleanup[1369]: 66D3788265D: message-id=<[email protected]>
mailserver  | Dec 22 18:37:20 mail opendkim[513]: 66D3788265D: sender.server.tld [ip-removed] not internal
mailserver  | Dec 22 18:37:20 mail opendkim[513]: 66D3788265D: not authenticated
mailserver  | Dec 22 18:37:20 mail postfix/qmgr[1247]: 66D3788265D: from=<[email protected]>, size=8216, nrcpt=1 (queue active)
mailserver  | Dec 22 18:37:20 mail postfix/smtpd[1361]: disconnect from sender.server.tld[ip-removed] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 commands=7
mailserver  | Dec 22 18:37:21 mail postfix/smtpd-amavis/smtpd[1381]: connect from localhost[127.0.0.1]
mailserver  | Dec 22 18:37:21 mail postfix/smtpd-amavis/smtpd[1381]: 660D8882659: client=localhost[127.0.0.1]
mailserver  | Dec 22 18:37:21 mail postfix/cleanup[1369]: 660D8882659: message-id=<[email protected]>
mailserver  | Dec 22 18:37:21 mail postfix/qmgr[1247]: 660D8882659: from=<[email protected]>, size=8819, nrcpt=1 (queue active)
mailserver  | Dec 22 18:37:21 mail amavis[1262]: (01262-01) Passed CLEAN {RelayedInbound}, [ip-removed]:35349 [ip-removed] <[email protected]> -> <[email protected]>, Queue-ID: 66D3788265D, Message-ID: <[email protected]>, mail_id: d6ssf7Smlvpc, Hits: 2.4, size: 8225, queued_as: 660D8882659, 835 ms
mailserver  | Dec 22 18:37:21 mail postfix/smtp-amavis/smtp[1371]: 66D3788265D: to=<[email protected]>, orig_to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.2, delays=0.35/0.01/0.01/0.83, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 660D8882659)
mailserver  | Dec 22 18:37:21 mail postfix/qmgr[1247]: 66D3788265D: removed
mailserver  | Dec 22 18:37:21 mail dovecot: lmtp(1383): Connect from local
mailserver  | Dec 22 18:37:21 mail dovecot: lmtp([email protected])<1383><Ob2FHNGVpGNnBQAAKO6Wng>: sieve: msgid=<[email protected]>: stored mail into mailbox 'INBOX'
mailserver  | Dec 22 18:37:21 mail dovecot: lmtp(1383): Disconnect from local: Client has quit the connection (state=READY)
mailserver  | Dec 22 18:37:21 mail postfix/lmtp[1382]: 660D8882659: to=<[email protected]>, relay=mail.domain.tld[/var/run/dovecot/lmtp], delay=0.07, delays=0.04/0.01/0.01/0.01, dsn=2.0.0, status=sent (250 2.0.0 <[email protected]> Ob2FHNGVpGNnBQAAKO6Wng Saved)
mailserver  | Dec 22 18:37:21 mail postfix/qmgr[1247]: 660D8882659: removed

docker-mailserver version: v11.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/questionSomeone asked a question - feel free to answermeta/help wantedThe OP requests help from others - chime in! :Dmeta/needs triageThis issue / PR needs checks and verification from maintainerspriority/low

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions