[GH-ISSUE #60] Self Hosted | Email bounce when fowarded/Domain part missing #660

Closed
opened 2026-03-14 10:00:07 +03:00 by kerem · 7 comments
Owner

Originally created by @slurdge on GitHub (Aug 19, 2020).
Original GitHub issue: https://github.com/anonaddy/anonaddy/issues/60

When forwarding the mail, the sender is rewritten but it bounces like so:

status=bounced (host spool.mail.gandi.net[217.70.178.1] said: 504 5.5.2 <mailer+example=example.org>: Sender address rejected: need fully-qualified address (in reply to RCPT TO command))

My guess is that the domain part is missing and thus not added after the part that should be before the @.
Related to this, the new aliases miss the domain part too (but are active).
Could it come from the fact that
ANONADDY_DOMAIN and ANONADDY_HOSTNAME are the same domain ?

Originally created by @slurdge on GitHub (Aug 19, 2020). Original GitHub issue: https://github.com/anonaddy/anonaddy/issues/60 When forwarding the mail, the sender is rewritten but it bounces like so: ``` status=bounced (host spool.mail.gandi.net[217.70.178.1] said: 504 5.5.2 <mailer+example=example.org>: Sender address rejected: need fully-qualified address (in reply to RCPT TO command)) ``` My guess is that the domain part is missing and thus not added after the part that should be before the @. Related to this, the new aliases miss the domain part too (but are active). Could it come from the fact that `ANONADDY_DOMAIN` and `ANONADDY_HOSTNAME` are the same domain ?
kerem closed this issue 2026-03-14 10:00:12 +03:00
Author
Owner

@slurdge commented on GitHub (Aug 19, 2020):

To add to it, here is what i see when I have users.

image

I don't understand from the code where the domain part is populated from. Probably it's lost somewhere or there is a step that I missed.

<!-- gh-comment-id:676435260 --> @slurdge commented on GitHub (Aug 19, 2020): To add to it, here is what i see when I have users. ![image](https://user-images.githubusercontent.com/1651201/90646573-a5258680-e237-11ea-9cad-c6e9b41364db.png) I don't understand from the code where the domain part is populated from. Probably it's lost somewhere or there is a step that I missed.
Author
Owner

@willbrowningme commented on GitHub (Aug 20, 2020):

Have you populated the ANONADDY_ALL_DOMAINS .env variable? This is just a list of all the domains you are using and want to allow other users to be able to use too.

<!-- gh-comment-id:677461638 --> @willbrowningme commented on GitHub (Aug 20, 2020): Have you populated the `ANONADDY_ALL_DOMAINS` .env variable? This is just a list of all the domains you are using and want to allow other users to be able to use too.
Author
Owner

@willbrowningme commented on GitHub (Aug 20, 2020):

It should be a comma separated list in your .env file like this:

ANONADDY_ALL_DOMAINS=anonaddy.com,anonaddy.me

<!-- gh-comment-id:677462111 --> @willbrowningme commented on GitHub (Aug 20, 2020): It should be a comma separated list in your .env file like this: `ANONADDY_ALL_DOMAINS=anonaddy.com,anonaddy.me`
Author
Owner

@slurdge commented on GitHub (Aug 20, 2020):

Yes that was it! I just tried and everything works as expected. I actually tried it while you commented, but I couldn't find it in the docs (apart from the .env.example file).
@crazy-max @willbrowningme Maybe we can derive this variable from the ANONADDY_DOMAIN variable if the ALL_DOMAINS one is empty ?

<!-- gh-comment-id:677486784 --> @slurdge commented on GitHub (Aug 20, 2020): Yes that was it! I just tried and everything works as expected. I actually tried it while you commented, but I couldn't find it in the docs (apart from the .env.example file). @crazy-max @willbrowningme Maybe we can derive this variable from the ANONADDY_DOMAIN variable if the ALL_DOMAINS one is empty ?
Author
Owner

@crazy-max commented on GitHub (Aug 20, 2020):

@slurdge

Maybe we can derive this variable from the ANONADDY_DOMAIN variable if the ALL_DOMAINS one is empty ?

I think this should be done directly through the app? WDYT @willbrowningme?

<!-- gh-comment-id:677552719 --> @crazy-max commented on GitHub (Aug 20, 2020): @slurdge > Maybe we can derive this variable from the ANONADDY_DOMAIN variable if the ALL_DOMAINS one is empty ? I think this should be done directly through the app? WDYT @willbrowningme?
Author
Owner

@willbrowningme commented on GitHub (Aug 20, 2020):

Yes I think that would be best, the relevant code is line 328 of the User model.

https://github.com/anonaddy/anonaddy/blob/master/app/User.php#L328

I'll push an update shortly.

<!-- gh-comment-id:677559833 --> @willbrowningme commented on GitHub (Aug 20, 2020): Yes I think that would be best, the relevant code is line 328 of the User model. https://github.com/anonaddy/anonaddy/blob/master/app/User.php#L328 I'll push an update shortly.
Author
Owner

@willbrowningme commented on GitHub (Aug 20, 2020):

Updated in v0.2.10 - https://github.com/anonaddy/anonaddy/releases/tag/v0.2.10

<!-- gh-comment-id:677665439 --> @willbrowningme commented on GitHub (Aug 20, 2020): Updated in v0.2.10 - https://github.com/anonaddy/anonaddy/releases/tag/v0.2.10
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#660
No description provided.