NethServer Version: 7.3
I encountered an issue with Getmail and I hope someone can assist me.
Mails retrieved via Getmail (Multidrop) that are meant to be either forwarded, or are aliases are not processed accordingly.
Scenario is as follows;
- all bbb mails are forwarded to ccc
- also/alternatively support@acme is an alias for support group
- aaa sends mail to bbb (This should be forwarded to ccc)
- aaa sends another mail to firstname.lastname@example.org (This should be received by all users in support group/alias)
- Then Getmail (fetches email)
- But if aaa sent the mails using different domain mailserver and Getmail fetches, the forwards and aliases dont work. Forwarded mails are delivered to the original recipient (not the forwarded user ccc). Aliases appear to get lost in the wild.
- But if aaa sent the mails locally (from same server), the forwards and aliases work as expected (ccc will get the mail). So I believe the issue might be with Getmail
[retriever] type = MultidropPOP3Retriever server = mbox.acme.com username = email@example.com password = mboxpassword envelope_recipient = envelope-to:1 [destination] type = MDA_external path = /usr/libexec/dovecot/dovecot-lda arguments = ("-e","-d","%(recipient)") user = vmail group = vmail [filter-1] type = Filter_classifier path = /usr/bin/clamdscan arguments = ("-c", "/etc/clamd.d/amavisd.conf", "--stdout", "--no-summary", "--infected", "-") exitcodes_drop = (1,) user = amavis [filter-2] type = Filter_external path = /usr/bin/spamc arguments = ("-E", "-s", "250000") exitcodes_keep = (0, 1) user = amavis group = amavis [options] read_all = false delete_after = 90 received = false message_log = /var/log/getmail.log message_log_verbose = true delivered_to = true max_message_size = 51200000
===Local send/delivery logs excerpt
May 7 20:32:43 mailserver postfix/qmgr: 0C7DC8024BD: from=<firstname.lastname@example.org>, size=1177, nrcpt=2 (queue active) May 7 20:32:43 mailserver postfix/smtpd: proxy-accept: END-OF-MESSAGE: 250 2.0.0 Ok: queued as 0C7DC8024BD; from=<email@example.com> to=<firstname.lastname@example.org> proto=ESMTP helo=<localhost> May 7 20:32:43 mailserver postfix/smtpd: disconnect from localhost[127.0.0.1] May 7 20:32:43 mailserver postfix/smtpd: disconnect from localhost[127.0.0.1] May 7 20:32:43 mailserver dovecot: lmtp(26560): Connect from local May 7 20:32:43 mailserver dovecot: lmtp(26560, email@example.com): r+a1BDtaD1nAZwAAstsg1A: sieve: msgid=<3788-590f5a00-1-692b7f00@122227921>: stored mail into mailbox 'INBOX' May 7 20:32:43 mailserver dovecot: lmtp(26560): Disconnect from local: Successful quit May 7 20:32:43 mailserver postfix/lmtp: 0C7DC8024BD: to=<firstname.lastname@example.org>, orig_to=<email@example.com>, relay=mailserver.acme.com[/var/run/dovecot/lmtp], delay=0.05, delays=0.02/0.01/0/0.02, dsn=2.0.0, status=sent (250 2.0.0 <firstname.lastname@example.org> r+a1BDtaD1nAZwAAstsg1A Saved) ============== External (getmail fetched)send/delivery logs excerpt May 7 21:03:30 mailserver spamd: spamd: processing message <email@example.com> for amavis:991 May 7 21:03:33 mailserver spamd: spamd: clean message (0.3/5.0) for amavis:991 in 3.5 seconds, 2790 bytes. May 7 21:03:33 mailserver spamd: spamd: result: . 0 - BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FORGED_MUA_MOZILLA,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS scantime=3.5,size=2790,user=amavis,uid=991,required_score=5.0,rhost=localhost,raddr=::1,rport=41200,mid=<firstname.lastname@example.org>,bayes=0.000000,autolearn=no autolearn_force=no May 7 21:03:33 mailserver spamd: prefork: child states: II May 7 21:03:33 mailserver dovecot: lda(email@example.com): sieve: msgid=<firstname.lastname@example.org>: stored mail into mailbox 'INBOX'
I noticed that locally, the mails are delivered via lmtp, but getmail’s mda_external is dovecot-lda. I dont know whether this has anything to do with it (I dont know how to set mda_external to lmtp, so I wasnt able to test using it)
I hope I have provided sufficient info