[GH-ISSUE #344] Emails fail to deliver on custom domain #846

Closed
opened 2026-03-14 10:52:22 +03:00 by kerem · 14 comments
Owner

Originally created by @ririko5834 on GitHub (Oct 9, 2022).
Original GitHub issue: https://github.com/anonaddy/anonaddy/issues/344

Hello, I have my own anonaddy instance in docker and I have added custom domain in domains tab, added DNS records to it and DNS check has succeeded.
But emails sent to alias with that custom domain are not getting forwarded. (emails sent to alias with my default anonaddy domain or anonaddy username subdomain works)

image
image

Oct 09 09:03:39 mail postfix/pipe[12244]: 9E7D81240125: to=<redacted>, relay=anonaddy, delay=3.5, delays=2.5/0.01/0/0.98, dsn=5.3.0, status=bounced (Command died with status 1: "php". Command output:  In DkimSigner.php line 42:                                                                                   Symfony\Component\Mime\Crypto\DkimSigner::__construct(): Argument #1 ($pk)      must be of type string, null given, called in /var/www/anonaddy/app/CustomM     ailDriver/CustomMailer.php on line 92                                                                                                                          )
Oct 09 09:06:59 mail postfix/anvil[12241]: statistics: max cache size 1 at Oct  9 09:03:35
Oct 09 09:06:59 mail postfix/anvil[12241]: statistics: max connection count 1 for (25:8.219.32.79) at Oct  9 09:03:35
Oct 09 09:16:27 mail postfix/smtpd[12347]: connect from mail-4027.protonmail.ch[185.70.40.27]
Oct 09 09:16:27 mail postfix/cleanup[12351]: A68BB1240125: message-id=<n-redacted>
Oct 09 09:16:27 mail postfix/smtpd[12347]: A68BB1240125: client=mail-4027.protonmail.ch[185.70.40.27]
Oct 09 09:16:27 mail postfix/smtpd[12347]: disconnect from mail-4027.protonmail.ch[185.70.40.27] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Oct 09 09:16:27 mail postfix/qmgr[1070]: A68BB1240125: from=<redacted>, size=2529, nrcpt=1 (queue active)
Oct 09 09:16:28 mail postfix/smtpd[12347]: connect from localhost[127.0.0.1]
Oct 09 09:16:28 mail postfix/smtpd[12347]: C9E601240130: client=localhost[127.0.0.1]
Oct 09 09:16:28 mail postfix/cleanup[12351]: C9E601240130: message-id=<redacted>
Oct 09 09:16:28 mail postfix/qmgr[1070]: C9E601240130: from=<redacted>, size=12066, nrcpt=1 (queue active)
Oct 09 09:16:28 mail postfix/smtpd[12347]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Oct 09 09:16:29 mail postfix/cleanup[12351]: 0678C1240134: message-id=<redacted>
Oct 09 09:16:29 mail postfix/bounce[12361]: A68BB1240125: sender non-delivery notification: 0678C1240134
Oct 09 09:16:29 mail postfix/pipe[12352]: A68BB1240125: to=<redacted>, relay=anonaddy, delay=1.7, delays=0.39/0.01/0/1.3, dsn=5.3.0, status=bounced (Command died with status 1: "php". Command output:  In DkimSigner.php line 42:                                                                                   Symfony\Component\Mime\Crypto\DkimSigner::__construct(): Argument #1 ($pk)      must be of type string, null given, called in /var/www/anonaddy/app/CustomM     ailDriver/CustomMailer.php on line 92                                                                                                                          )
Oct 09 09:16:29 mail postfix/qmgr[1070]: 0678C1240134: from=<>, size=4943, nrcpt=1 (queue active)
Oct 09 09:16:29 mail postfix/qmgr[1070]: A68BB1240125: removed
Oct 09 09:16:31 mail postfix/qmgr[1070]: C9E601240130: removed
Oct 09 09:16:37 mail postfix/smtp[12362]: 0678C1240134: to=<redacted>, relay=mail.protonmail.ch[185.70.42.128]:25, delay=8.5, delays=0/0.01/6.3/2.2, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 4MlbyW3gFvz9vNQ4)
Oct 09 09:16:37 mail postfix/qmgr[1070]: 0678C1240134: removed
crond: USER anonaddy pid 12363 cmd php /var/www/anonaddy/artisan schedule:run --no-ansi --no-interaction
   INFO  No scheduled commands are ready to run.  
Oct 09 09:16:31 mail postfix/smtp[12360]: C9E601240130: to=<redacted>, relay=redacted:25, delay=2.3, delays=0.06/0.01/0.96/1.3, dsn=2.0.0, status=sent (250 OK id=1ohSQA-00FO0w-2A)
Originally created by @ririko5834 on GitHub (Oct 9, 2022). Original GitHub issue: https://github.com/anonaddy/anonaddy/issues/344 Hello, I have my own anonaddy instance in docker and I have added custom domain in domains tab, added DNS records to it and DNS check has succeeded. But emails sent to alias with that custom domain are not getting forwarded. (emails sent to alias with my default anonaddy domain or anonaddy username subdomain works) ![image](https://user-images.githubusercontent.com/64729293/194748654-9148e793-6cd1-4357-8b5b-0a54d89bb20c.png) ![image](https://user-images.githubusercontent.com/64729293/194748692-d7098528-f65c-4586-9ca3-629638003125.png) ``` Oct 09 09:03:39 mail postfix/pipe[12244]: 9E7D81240125: to=<redacted>, relay=anonaddy, delay=3.5, delays=2.5/0.01/0/0.98, dsn=5.3.0, status=bounced (Command died with status 1: "php". Command output: In DkimSigner.php line 42: Symfony\Component\Mime\Crypto\DkimSigner::__construct(): Argument #1 ($pk) must be of type string, null given, called in /var/www/anonaddy/app/CustomM ailDriver/CustomMailer.php on line 92 ) Oct 09 09:06:59 mail postfix/anvil[12241]: statistics: max cache size 1 at Oct 9 09:03:35 Oct 09 09:06:59 mail postfix/anvil[12241]: statistics: max connection count 1 for (25:8.219.32.79) at Oct 9 09:03:35 Oct 09 09:16:27 mail postfix/smtpd[12347]: connect from mail-4027.protonmail.ch[185.70.40.27] Oct 09 09:16:27 mail postfix/cleanup[12351]: A68BB1240125: message-id=<n-redacted> Oct 09 09:16:27 mail postfix/smtpd[12347]: A68BB1240125: client=mail-4027.protonmail.ch[185.70.40.27] Oct 09 09:16:27 mail postfix/smtpd[12347]: disconnect from mail-4027.protonmail.ch[185.70.40.27] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5 Oct 09 09:16:27 mail postfix/qmgr[1070]: A68BB1240125: from=<redacted>, size=2529, nrcpt=1 (queue active) Oct 09 09:16:28 mail postfix/smtpd[12347]: connect from localhost[127.0.0.1] Oct 09 09:16:28 mail postfix/smtpd[12347]: C9E601240130: client=localhost[127.0.0.1] Oct 09 09:16:28 mail postfix/cleanup[12351]: C9E601240130: message-id=<redacted> Oct 09 09:16:28 mail postfix/qmgr[1070]: C9E601240130: from=<redacted>, size=12066, nrcpt=1 (queue active) Oct 09 09:16:28 mail postfix/smtpd[12347]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5 Oct 09 09:16:29 mail postfix/cleanup[12351]: 0678C1240134: message-id=<redacted> Oct 09 09:16:29 mail postfix/bounce[12361]: A68BB1240125: sender non-delivery notification: 0678C1240134 Oct 09 09:16:29 mail postfix/pipe[12352]: A68BB1240125: to=<redacted>, relay=anonaddy, delay=1.7, delays=0.39/0.01/0/1.3, dsn=5.3.0, status=bounced (Command died with status 1: "php". Command output: In DkimSigner.php line 42: Symfony\Component\Mime\Crypto\DkimSigner::__construct(): Argument #1 ($pk) must be of type string, null given, called in /var/www/anonaddy/app/CustomM ailDriver/CustomMailer.php on line 92 ) Oct 09 09:16:29 mail postfix/qmgr[1070]: 0678C1240134: from=<>, size=4943, nrcpt=1 (queue active) Oct 09 09:16:29 mail postfix/qmgr[1070]: A68BB1240125: removed Oct 09 09:16:31 mail postfix/qmgr[1070]: C9E601240130: removed Oct 09 09:16:37 mail postfix/smtp[12362]: 0678C1240134: to=<redacted>, relay=mail.protonmail.ch[185.70.42.128]:25, delay=8.5, delays=0/0.01/6.3/2.2, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 4MlbyW3gFvz9vNQ4) Oct 09 09:16:37 mail postfix/qmgr[1070]: 0678C1240134: removed crond: USER anonaddy pid 12363 cmd php /var/www/anonaddy/artisan schedule:run --no-ansi --no-interaction INFO No scheduled commands are ready to run. Oct 09 09:16:31 mail postfix/smtp[12360]: C9E601240130: to=<redacted>, relay=redacted:25, delay=2.3, delays=0.06/0.01/0.96/1.3, dsn=2.0.0, status=sent (250 OK id=1ohSQA-00FO0w-2A) ```
kerem closed this issue 2026-03-14 10:52:27 +03:00
Author
Owner

@willbrowningme commented on GitHub (Oct 10, 2022):

You can see from the error message:

Command died with status 1: "php". Command output: In DkimSigner.php line 42

That this is likely because you have not created or used the correct environment variables for:

ANONADDY_DKIM_SIGNING_KEY and ANONADDY_DKIM_SELECTOR which are required for signing custom domains.

Please read the information in the docker repo here - https://github.com/anonaddy/docker#anonaddy

<!-- gh-comment-id:1273156873 --> @willbrowningme commented on GitHub (Oct 10, 2022): You can see from the error message: `Command died with status 1: "php". Command output: In DkimSigner.php line 42` That this is likely because you have not created or used the correct environment variables for: `ANONADDY_DKIM_SIGNING_KEY` and `ANONADDY_DKIM_SELECTOR` which are required for signing custom domains. Please read the information in the docker repo here - https://github.com/anonaddy/docker#anonaddy
Author
Owner

@ririko5834 commented on GitHub (Oct 10, 2022):

I didnt provide that, is it needed?

<!-- gh-comment-id:1273352526 --> @ririko5834 commented on GitHub (Oct 10, 2022): I didnt provide that, is it needed?
Author
Owner

@ririko5834 commented on GitHub (Oct 10, 2022):

And how to get it? What should I fill there?

<!-- gh-comment-id:1273354886 --> @ririko5834 commented on GitHub (Oct 10, 2022): And how to get it? What should I fill there?
Author
Owner

@willbrowningme commented on GitHub (Oct 10, 2022):

Please read the entire read me - https://github.com/anonaddy/docker#generate-dkim-privatepublic-keypair

<!-- gh-comment-id:1273373144 --> @willbrowningme commented on GitHub (Oct 10, 2022): Please read the entire read me - https://github.com/anonaddy/docker#generate-dkim-privatepublic-keypair
Author
Owner

@ririko5834 commented on GitHub (Oct 11, 2022):

I host anonaddy using portainer, but there is no option to run command for compose (stack). When I run it on vps it can't find docker-compose.yml file, I dont know where portainer stores it.

<!-- gh-comment-id:1274828423 --> @ririko5834 commented on GitHub (Oct 11, 2022): I host anonaddy using portainer, but there is no option to run command for compose (stack). When I run it on vps it can't find docker-compose.yml file, I dont know where portainer stores it.
Author
Owner

@ririko5834 commented on GitHub (Oct 11, 2022):

Generated dkim by running curl https://github.com/anonaddy/docker/blob/master/rootfs/usr/local/bin/gen-dkim | sh inside the docker container. But idk how do I generate GPG key.
Also that cmd generated dkim key just for the main domain of my instance (not for the custom domain I have added in anonaddy dashboard). Email forwarding still fails for that custom domain, same error

<!-- gh-comment-id:1274857889 --> @ririko5834 commented on GitHub (Oct 11, 2022): Generated dkim by running `curl https://github.com/anonaddy/docker/blob/master/rootfs/usr/local/bin/gen-dkim | sh` inside the docker container. But idk how do I generate GPG key. Also that cmd generated dkim key just for the main domain of my instance (not for the custom domain I have added in anonaddy dashboard). Email forwarding still fails for that custom domain, same error
Author
Owner

@ririko5834 commented on GitHub (Oct 13, 2022):

@willbrowningme

<!-- gh-comment-id:1277609961 --> @ririko5834 commented on GitHub (Oct 13, 2022): @willbrowningme
Author
Owner

@ririko5834 commented on GitHub (Oct 14, 2022):

image

<!-- gh-comment-id:1279048976 --> @ririko5834 commented on GitHub (Oct 14, 2022): ![image](https://user-images.githubusercontent.com/64729293/195865236-486b0acb-68ea-445f-aa78-c33347fee836.png)
Author
Owner

@ririko5834 commented on GitHub (Oct 22, 2022):

@willbrowningme Please help me

<!-- gh-comment-id:1287755552 --> @ririko5834 commented on GitHub (Oct 22, 2022): @willbrowningme Please help me
Author
Owner

@willbrowningme commented on GitHub (Oct 24, 2022):

You don't need to generate a GPG if you are not encrypting and signing messages.

<!-- gh-comment-id:1288897651 --> @willbrowningme commented on GitHub (Oct 24, 2022): You don't need to generate a GPG if you are not encrypting and signing messages.
Author
Owner

@ririko5834 commented on GitHub (Oct 24, 2022):

So why its not working then? I created DKIM (using curl https://github.com/anonaddy/docker/blob/master/rootfs/usr/local/bin/gen-dkim | sh inside the docker container) but still getting the same error.

<!-- gh-comment-id:1289187471 --> @ririko5834 commented on GitHub (Oct 24, 2022): So why its not working then? I created DKIM (using `curl https://github.com/anonaddy/docker/blob/master/rootfs/usr/local/bin/gen-dkim | sh` inside the docker container) but still getting the same error.
Author
Owner

@willbrowningme commented on GitHub (Oct 25, 2022):

Did you make sure to update ANONADDY_DKIM_SIGNING_KEY to point to the absolute path of the DKIM private key you generated?

<!-- gh-comment-id:1290295446 --> @willbrowningme commented on GitHub (Oct 25, 2022): Did you make sure to update `ANONADDY_DKIM_SIGNING_KEY` to point to the absolute path of the DKIM private key you generated?
Author
Owner

@ririko5834 commented on GitHub (Oct 25, 2022):

No. Should I point it to path in the container - like /data/dkim/anonaddy-domain.com.private?

<!-- gh-comment-id:1290639967 --> @ririko5834 commented on GitHub (Oct 25, 2022): No. Should I point it to path in the container - like `/data/dkim/anonaddy-domain.com.private`?
Author
Owner

@ririko5834 commented on GitHub (Oct 25, 2022):

Added it and now it works, thanks

<!-- gh-comment-id:1290651310 --> @ririko5834 commented on GitHub (Oct 25, 2022): Added it and now it works, thanks
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/anonaddy#846
No description provided.