Topic: Catch-all forwarding not working.
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.3.1
- Deployed with iRedMail Easy or the downloadable installer? the latter
- Linux/BSD distribution name and version: 18.04 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Following the instructions on https://docs.iredmail.org/sql.create.catch-all.html to set up catch-all forwarding on my domain.
My domain is mydomain.com, and I'd like to forward all emails targeted at all the users on mydomain.com to someuser@gmail.com.
I've created the catch-all record in forwardings table:
INSERT INTO forwardings (address, forwarding, domain, dest_domain, is_list, active) VALUES ('@mydomain.com', 'someuser@gmail.com', 'mydomain.com', 'gmail.com', 1, 1);
Tried 'mydomain.com' for address instead of '@mydomain.com', but did no work either.
Maillog output:
Jan 6 05:05:39 mail postfix/smtpd[3838]: connect from mail-yb1-f173.google.com[209.85.219.173]
Jan 6 05:05:39 mail postfix/smtpd[3838]: Anonymous TLS connection established from mail-yb1-f173.google.com[209.85.219.173]: TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
Jan 6 05:05:40 mail spamass-milter[1007]: Could not retrieve sendmail macro "i"!. Please add it to confMILTER_MACROS_ENVFROM for better spamassassin results
Jan 6 05:05:40 mail postfix/smtpd[3838]: 4D9ckr1K13z23lS: client=mail-yb1-f173.google.com[209.85.219.173]
Jan 6 05:05:40 mail postfix/cleanup[3852]: 4D9ckr1K13z23lS: message-id=<CALOzRNLbHESG=kdGaeX0SBM7JdhE_pdbGyBGzvYmOWgELozznQ@mail.gmail.com>
Jan 6 05:05:40 mail postfix/qmgr[2245]: 4D9ckr1K13z23lS: from=<jane@gmail.com>, size=2549, nrcpt=1 (queue active)
Jan 6 05:05:40 mail postfix/smtpd[3838]: disconnect from mail-yb1-f173.google.com[209.85.219.173] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 commands=7
Jan 6 05:05:41 mail postfix/pickup[2244]: 4D9cks04Svz23lV: uid=1000 from=<jane@gmail.com>
Jan 6 05:05:41 mail postfix/cleanup[3852]: 4D9cks04Svz23lV: message-id=<CALOzRNLbHESG=kdGaeX0SBM7JdhE_pdbGyBGzvYmOWgELozznQ@mail.gmail.com>
Jan 6 05:05:41 mail postfix/qmgr[2245]: 4D9cks04Svz23lV: from=<jane@gmail.com>, size=3002, nrcpt=1 (queue active)
Jan 6 05:05:41 mail postfix/pipe[3858]: 4D9ckr1K13z23lS: to=<someuser@mydomain.com>, relay=spamassassin, delay=0.95, delays=0.38/0/0/0.57, dsn=2.0.0, status=sent (delivered via spamassassin service)
Jan 6 05:05:41 mail postfix/qmgr[2245]: 4D9ckr1K13z23lS: removed
Jan 6 05:05:41 mail amavis[2788]: (02788-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to a UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
Jan 6 05:05:42 mail amavis[2788]: (02788-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to a UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
Jan 6 05:05:42 mail amavis[2788]: (02788-01) (!)clamav-socket: All attempts (1) failed connecting to /var/run/clamav/clamd.ctl, retrying (2)
Jan 6 05:05:48 mail amavis[2788]: (02788-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to a UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
Jan 6 05:05:48 mail amavis[2788]: (02788-01) (!)clamav-socket av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamav/clamd.ctl (All attempts (1) failed connecting to /var/run/clamav/clamd.ctl) at (eval 113) line 659.\n
Jan 6 05:05:48 mail amavis[2788]: (02788-01) (!)WARN: all primary virus scanners failed, considering backups
Jan 6 05:06:07 mail postfix/10025/smtpd[3886]: connect from mail.mailiber.com[127.0.0.1]
Jan 6 05:06:07 mail postfix/10025/smtpd[3886]: 4D9clM23KFz23lX: client=mail.mailiber.com[127.0.0.1]
Jan 6 05:06:07 mail postfix/cleanup[3852]: 4D9clM23KFz23lX: message-id=<CALOzRNLbHESG=kdGaeX0SBM7JdhE_pdbGyBGzvYmOWgELozznQ@mail.gmail.com>
Jan 6 05:06:07 mail postfix/qmgr[2245]: 4D9clM23KFz23lX: from=<jane@gmail.com>, size=4397, nrcpt=1 (queue active)
Jan 6 05:06:07 mail postfix/10025/smtpd[3886]: disconnect from mail.mailiber.com[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Jan 6 05:06:07 mail amavis[2788]: (02788-01) Passed CLEAN {RelayedInternal}, ORIGINATING LOCAL [127.0.0.1] [209.85.219.173] /ESMTP <jane@gmail.com> -> <someuser@mydomain.com>, (ESMTPS://209.85.219.173), Message-ID: <CALOzRNLbHESG=kdGaeX0SBM7JdhE_pdbGyBGzvYmOWgELozznQ@mail.gmail.com>, mail_id: Ndme8bmnSxQG, b: RXGvRH1lI, Hits: -0.198, size: 2962, queued_as: 4D9clM23KFz23lX, Subject: "sss", From: <jane@gmail.com> (dkim:AUTHOR), helo=, Tests: [DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DKIM_VALID_EF=-0.1,FREEMAIL_FROM=0.001,HTML_MESSAGE=0.001,RCVD_IN_DNSWL_NONE=-0.0001,RCVD_IN_MSPIKE_H2=-0.001,SPF_HELO_NONE=0.001,SPF_PASS=-0.001,TVD_SPACE_RATIO=0.001], autolearn=ham autolearn_force=no, autolearnscore=-0.197, dkim_i=@gmail.com, dkim_sd=20161025:gmail.com, dkim_new=dkim:mailiber.com, 26271 ms
Jan 6 05:06:07 mail postfix/amavis/smtp[3862]: 4D9cks04Svz23lV: to=<someuser@mydomain.com>, relay=127.0.0.1[127.0.0.1]:10026, delay=26, delays=0.01/0.01/0.03/26, 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 4D9clM23KFz23lX)
Jan 6 05:06:07 mail postfix/qmgr[2245]: 4D9cks04Svz23lV: removed
Jan 6 05:06:07 mail postfix/pipe[3887]: 4D9clM23KFz23lX: to=<someuser@mydomain.com>, relay=dovecot, delay=0.07, delays=0.01/0.01/0/0.06, dsn=2.0.0, status=sent (delivered via dovecot service)
Jan 6 05:06:07 mail postfix/qmgr[2245]: 4D9clM23KFz23lX: removed
Now if I create a non-catch-all forwarding like this:
INSERT INTO forwardings (address, forwarding, domain, dest_domain, is_list, active) VALUES ('user@mydomain.com', 'someuser@gmail.com', 'mydomain.com', 'gmail.com', 1, 1);
and send an email to user@mydomain.com, I am able to get the forwarded email at someuser@gmail.com though.
But not in the catch-all case.
Am I missing something here?
Thanks.
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.