1

Topic: Unable to send as alias

I've added some extra sender address extension delimiters - and . In addition to the default + character. I can receive OK on all 3 but only send on + where do I add the other characters as valid for sending m

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Unable to send as alias

- Curious, why do you need so many delimiters?
- Which config files did you modify to support extra delimiters?
- What error message did you get when sending as address with extra delimiters?

3 (edited by alec.iredmail 2019-03-13 13:46:01)

Re: Unable to send as alias

Honestly I only need/want to use the fullstop [.] delimiter but as it's not functional for sending purposes I've left the others in for now.

Modifications I've made are as follows:

1)
in /opt/iredapd/settings.py added line
ALLOWED_LOGIN_MISMATCH_LIST_MEMBER = True

2)
in /opt/iRedAPD-2.4/libs/default_settings.py
changed line to the following
RECIPIENT_DELIMITERS = ['+-.']

3)
in /etc/postfix/main.cf
changed line to the following
recipient_delimiter = +-.

4)
in /etc/postfix/main.cf
add line
propagate_unmatched_extensions = canonical, virtual, alias, forward, include

5)
in /etc/dovecot/dovecot.conf
changed the line to the following
recipient_delimiter = +-.

6)
in  /opt/iRedAPD-2.4/libs/default_settings.py
changed line to the following
RECIPIENT_DELIMITERS = ['+-.']

7)
in  /etc/postfix/recipient_canonical_maps
added line
/^(.+)[\+-.].+@(.*)/ ${1}@${2}

the error given from the roundcube UI is -

SMTP Error (554): Failed to add recipient "mailbox@example.com" (5.7.1 <mailbox@example.com>: Recipient address rejected: Sender is not same as SMTP authenticate username).

note that the SMTP in the error denotes the destination, not the sender. The error only presents when using a 'from' address containing a . fullstop, using a from address with a + or - will send fine.

if i'm to tail the /var/log/mail.log the error is much the same

Mar 12 00:17:43 mail roundcube: <2m7kgs10> SMTP Error: Failed to add recipient 'anywhere@test.com'. 5.7.1 <anywhere@test.com>: Recipient address rejected: Sender is not same as SMTP authenticate username (Code: 554) in /opt/www/roundcubemail-1.3.8/program/lib/Roundcube/rcube.php on line 1667 (POST /mail/?_task=mail&_unlock=loading1552349862610&_lang=en_US&_framed=1&_action=send)
Mar 12 00:17:43 mail postfix/submission/smtpd[2850]: disconnect from mail.myserver.com[127.0.0.1] ehlo=2 starttls=1 auth=1 mail=1 rcpt=0/1 rset=1 quit=1 commands=7/8

4

Re: Unable to send as alias

I know I can add
ALLOWED_LOGIN_MISMATCH_SENDERS = ['mailbox@mydomain.com']
to /opt/iredapd/settings.py

but this would allow the mailbox to send as any address, I only want users to be able to send as user.xxx@domain.com where user is their own mailbox name

5

Re: Unable to send as alias

alec.iredmail wrote:

note that the SMTP in the error denotes the destination, not the sender. The error only presents when using a 'from' address containing a . fullstop, using a from address with a + or - will send fine.

What's the real username part of your email address? i'd like to test it locally and fix it.

6

Re: Unable to send as alias

ZhangHuangbin wrote:
alec.iredmail wrote:

note that the SMTP in the error denotes the destination, not the sender. The error only presents when using a 'from' address containing a . fullstop, using a from address with a + or - will send fine.

What's the real username part of your email address? i'd like to test it locally and fix it.

Just 'alec' without quotes, nothing fancy

7 (edited by alec.iredmail 2019-03-13 13:46:14)

Re: Unable to send as alias

I've just removed the change 7) (/etc/postfix/recipient_canonical_map is now an empty file) as it didn't seem to be required. I'm no longer able to send as any alias now however, alec-test@domain.com for example will give the error 5.7.1 - I'm not sure when it stopped working.

8

Re: Unable to send as alias

I think I've used some incorrect terminology here, to clarify - i'm attempting to change the sending and reply-to addresses in roundcube to 'send as' my main account with a delimited extension. so for example :

alec.iredmail@domain.com in place of simply alec@domain.com

The only way I've reliably able to do this is by adding ALLOWED_LOGIN_MISMATCH_SENDERS = ['alec@domain.com'] to /opt/iredapd/settings.py

unfortunately this has the side effect of allowing me to send as postmaster@domain.com , for example. I do not want users to be able to send-as other users, only themselves with a delimited extension.