1 (edited by Marcel F. 2013-11-05 19:10:16)

Topic: One Time eMail-Address Support (or something like that)?

==== Required information ====
- iRedMail version: 0.8.5
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Linux/BSD distribution name and version: CentOS 6.4
- Related log if you're reporting an issue:
====

Hi,

i've running iRedMail in a test center environment.
An requirement for this is to provide some "One Time Mail-Address" related solution.
So, if a email gets to the address XY0815@some.domain.com it should be possible in some way to view this mail.

The other way i can imagine to achieve this is the following
I create an mail account like XY@some.domain.com
This account receives mails for XY@some.domain.com .. but it should also receive mails for XY<anystring>@some.domain.com
And i don't want to add Aliases for this by my own, cause the automated test generate its mail address randomly. But i can say the generated mails should always begin with XY and add some characters after.

Hope you understand what i mean :-)

cheers,
Marcel

2

Re: One Time eMail-Address Support (or something like that)?

If you use 'XY+<anystring>@some.domain.com', it should work without addition modification, because '+' is default delimiter used in Postfix (SMTP) and Dovecot (Local Deliver Agent, and IMAP/POP3/Managesieve server).

3

Re: One Time eMail-Address Support (or something like that)?

Hi,

thx for the hint.

The Server accepted the mail but they where not delivered to the INBOX. [1]
It created a hidden directory per added <anystring>. [2]

[1]

Nov  5 12:30:22 iredmail postfix/smtpd[29616]: connect from unknown[XXX.XXX.XXX.XXX]
Nov  5 12:30:22 iredmail postfix/smtpd[29616]: 91330540A48: client=unknown[XXX.XXX.XXX.XXX]
Nov  5 12:30:22 iredmail postfix/cleanup[29621]: 91330540A48: message-id=<286F2A0632829A4485EA7471C053E880BEE7C330@HOST.SOMEDOMAIN>
Nov  5 12:30:22 iredmail postfix/qmgr[19836]: 91330540A48: from=<remote-account@example.net>, size=11375, nrcpt=1 (queue active)
Nov  5 12:30:22 iredmail postfix/smtpd[29616]: disconnect from unknown[XXX.XXX.XXX.XXX]
Nov  5 12:30:24 iredmail postfix/smtpd[29625]: connect from iredmail.example.com[127.0.0.1]
Nov  5 12:30:24 iredmail postfix/smtpd[29625]: 27DB1540A4A: client=iredmail.example.com[127.0.0.1]
Nov  5 12:30:24 iredmail postfix/cleanup[29621]: 27DB1540A4A: message-id=<286F2A0632829A4485EA7471C053E880BEE7C330@HOST.SOMEDOMAIN>
Nov  5 12:30:24 iredmail postfix/smtpd[29625]: disconnect from iredmail.example.com[127.0.0.1]
Nov  5 12:30:24 iredmail postfix/qmgr[19836]: 27DB1540A4A: from=<remote-account@example.net>, size=11899, nrcpt=1 (queue active)
Nov  5 12:30:24 iredmail amavis[29292]: (29292-01) Passed CLEAN {RelayedOutbound}, MYNETS LOCAL [XXX.XXX.XXX.XXX]:41498 [XXX.XXX.XXX.XXX] <remote-account@example.net> -> <tester01+ASF                                                    NGE@demo.some.example.com>, Message-ID: <286F2A0632829A4485EA7471C053E880BEE7C330@HOST.SOMEDOMAIN>, mail_id: vhnU71pYuGu4, Hits: -10, size: 11375, queued_as: 27DB1540A4A, 1570 m                                                    s
Nov  5 12:30:24 iredmail postfix/smtp[29622]: 91330540A48: to=<tester01+ASFNGE@demo.some.example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.6, delays=0.03/0.01/0.01/1.6,                                                     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 27DB1540A4A)
Nov  5 12:30:24 iredmail postfix/qmgr[19836]: 91330540A48: removed
Nov  5 12:30:24 iredmail postfix/pipe[29626]: 27DB1540A4A: to=<tester01+ASFNGE@demo.some.example.com>, relay=dovecot, delay=0.08, delays=0.01/0.01/0/0.05, dsn=2.0.0, status=s                                                    ent (delivered via dovecot service)
Nov  5 12:33:35 iredmail postfix/smtpd[29655]: connect from unknown[XXX.XXX.XXX.XXX]

Nov  5 12:33:35 iredmail postfix/smtpd[29655]: 30DFA540A48: client=unknown[XXX.XXX.XXX.XXX]
Nov  5 12:33:35 iredmail postfix/cleanup[29658]: 30DFA540A48: message-id=<286F2A0632829A4485EA7471C053E880BEE7C33E@HOST.SOMEDOMAIN>
Nov  5 12:33:35 iredmail postfix/qmgr[19836]: 30DFA540A48: from=<remote-account@example.net>, size=11301, nrcpt=1 (queue active)
Nov  5 12:33:35 iredmail postfix/smtpd[29655]: disconnect from unknown[XXX.XXX.XXX.XXX]
Nov  5 12:33:36 iredmail postfix/smtpd[29662]: connect from iredmail.example.com[127.0.0.1]
Nov  5 12:33:36 iredmail postfix/smtpd[29662]: A0CC2540A4A: client=iredmail.example.com[127.0.0.1]
Nov  5 12:33:36 iredmail postfix/cleanup[29658]: A0CC2540A4A: message-id=<286F2A0632829A4485EA7471C053E880BEE7C33E@HOST.SOMEDOMAIN>
Nov  5 12:33:36 iredmail postfix/qmgr[19836]: A0CC2540A4A: from=<remote-account@example.net>, size=11825, nrcpt=1 (queue active)
Nov  5 12:33:36 iredmail postfix/smtpd[29662]: disconnect from iredmail.example.com[127.0.0.1]
Nov  5 12:33:36 iredmail amavis[29293]: (29293-01) Passed CLEAN {RelayedOutbound}, MYNETS LOCAL [XXX.XXX.XXX.XXX]:54482 [XXX.XXX.XXX.XXX] <remote-account@example.net> -> <tester01+hurz87@demo.some.example.com>, Message-ID: <286F2A       0632829A4485EA7471C053E880BEE7C33E@HOST.SOMEDOMAIN>, mail_id: JcLxcjyyN0UJ, Hits: -10, size: 11301, queued_as: A0CC2540A4A, 1464 ms
Nov  5 12:33:36 iredmail postfix/smtp[29659]: 30DFA540A48: to=<tester01+hurz87@demo.some.example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.5, delays=0.03/0.01/0.01/1.5, dsn=2.0.0, status=sent (250 2.0.0 from MTA(s       mtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as A0CC2540A4A)
Nov  5 12:33:36 iredmail postfix/qmgr[19836]: 30DFA540A48: removed
Nov  5 12:33:36 iredmail postfix/pipe[29663]: A0CC2540A4A: to=<tester01+hurz87@demo.some.example.com>, relay=dovecot, delay=0.08, delays=0.01/0.01/0/0.06, dsn=2.0.0, status=sent (delivered via dovecot service)
Nov  5 12:33:36 iredmail postfix/qmgr[19836]: A0CC2540A4A: removed

[2]

[root@iredmail Maildir]# ls -al
total 88
drwx------ 11 vmail vmail  4096 Nov  5 13:54 .
drwx------  3 vmail vmail  4096 Oct 31 12:44 ..
drwx------  5 vmail vmail  4096 Nov  5 12:50 .asfnge
drwx------  2 vmail vmail  4096 Nov  5 12:48 cur
-rw-------  1 vmail vmail 21504 Nov  5 12:31 dovecot.index.cache
-rw-------  1 vmail vmail  2276 Nov  5 12:49 dovecot.index.log
-rw-------  1 vmail vmail   168 Nov  5 12:50 dovecot.mailbox.log
-rw-------  1 vmail vmail   255 Oct 31 15:24 dovecot-uidlist
-rw-------  1 vmail vmail     8 Nov  5 12:33 dovecot-uidvalidity
-r--r--r--  1 vmail vmail     0 Oct 31 12:44 dovecot-uidvalidity.52724289
drwx------  5 vmail vmail  4096 Oct 31 12:47 .Drafts
drwx------  5 vmail vmail  4096 Nov  5 12:51 .hurz87
drwx------  5 vmail vmail  4096 Oct 31 12:47 .Junk
drwx------  2 vmail vmail  4096 Oct 31 15:24 new
drwx------  5 vmail vmail  4096 Oct 31 15:13 .Sent
-rw-------  1 vmail vmail    43 Nov  5 12:50 subscriptions
drwx------  2 vmail vmail  4096 Oct 31 15:24 tmp
drwx------  5 vmail vmail  4096 Oct 31 12:47 .Trash
[root@iredmail Maildir]#

4

Re: One Time eMail-Address Support (or something like that)?

Found it.

in /etc/postfix/master.cf change

dovecot unix    -       n       n       -       -      pipe
    flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${user}@${domain} -m ${extension}

to

dovecot unix    -       n       n       -       -      pipe
        flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${user}@${domain}