1

Topic: mailing list and reply-to address

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

Hi,
i'm quite new to iredmail. I've setup a mail server for my own little domain. I was able to setup accounts and its works.
What I'm trying to manage now are mailing lists through phpldapadmin.

I followed instructions here
http://www.iredmail.org/wiki/index.php? … pLDAPadmin

I setup different mailing lists and they appear to work correctly. What I'm trying to to is implement a behaviour that i had with mailman:
whenever a message is sent to a mailing list, a reply-to is appended to the message, so that if the member of the ML receving the email click "reply" (and not "replyall") the message will be directed to the ML itself.
I don't know if this is possible and/or how to implement it. Alternatively, is it possible to make any message sent to a ML "masquerade" so that the "From:" field for any message sent to the ML is always the ML address itself?

Thanks
regards
gianluca

2

Re: mailing list and reply-to address

Unfortunately, the built-in mailing list implementation doesn't support this. You need a mailing list manager like Mailman.

3

Re: mailing list and reply-to address

thanks. it was very comfortable to use ldap to manage ML, but at the end i will switch to some ML engine again. only i feel a bit not so easy mailman for my kind of list management, do you know if someone ever tried procmail + smartlist? I read somewhere that is possible to define a procmail mailbox in iredmail, isn't it?

4 (edited by gurutech 2013-04-15 09:07:33)

Re: mailing list and reply-to address

Hi ZhangHuangbin
I think I almost emulated the mimic of mailman just using standard iredmail distribution list. I used a little trick and procmail delivery. I write it here in case anyone is interested

I added procmail transport in master.cf

procmail unix - n n - - pipe
  flags=DRhu user=vmail:vmail argv=/usr/bin/procmail -r -t SENDER=${sender} RECIPIENT=${recipient} DOMAIN=${nexthop} -m USER=${user} EXTENSION=${extension} /etc/procmailrc

then i installed the following /etc/procmailrc

SHELL='/bin/sh'
PATH='/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin'
DROPPRIVS=yes
LOGFILE='/var/log/procmail.log'
VERBOSE=no
FORMAIL='formail'
SENDMAIL='/usr/sbin/sendmail'
MAILBOX="/var/vmail/procmail1/$DOMAIN/$USER/Maildir/"
DEFAULT="$MAILBOX"
JUNK="${MAILBOX}/.Junk/"
RECIPIENT="${RECIPIENT}"
SENDER="${SENDER}"
:0
* ? [ -d ${MAILBOX} ] || mkdir -p $MAILBOX
{ }
:0 H
* ^X-Spam-Status: YES
${JUNK}
SWITCHRC="/var/vmail/procmail1/$DOMAIN/$USER/.procmailrc"

then I created a normal email user in phpldapadmin and setted
homeDirectory = /var/vmail/procmail1/MYDOMAIN/MYLISTADDR/
mailMessageStore = procmail1/MYDOMAIN/MYLISTADDR/
mtaTransport = procmail

now, doing this, I'm able to use a personalized .procmailrc for each user created this way.
So one external member may write to mylistaddr@mydomain.com that is a procmail mailbox, and let procmail forward the message to the iredmail-distribution-list@mydomain.com created with ldap/iredmail, and add a reply-to and a [LABEL] to each message. This is done by the following  .procmailrc. I'm still working on make it work for closed lists.

place this .procmailrc (owned by vmail) in /var/vmail/procmail1/MYDOMAIN/MYLISTADDR/

:0 H
* ^X-Loop: mylistaddr@mydomain.com
$MAILBOX/.Bounces/

:0 chfw   
SUBJECT=| formail -xSubject:


:0 Wfc
* ^Subject:.*\[ADD_LABEL_TO_SUBJ\]
| formail -A "X-Loop: mylistaddr@mydomain.com" -I "Reply-To: mylistaddr@mydomain.com"

:0 WEfc
* !^Subject:.*\[ADD_LABEL_TO_SUBJ\]
| formail -A "X-Loop: mylistaddr@mydomain.com" -I "Reply-To: mylistaddr@mydomain.com" -I "Subject: [ADD_LABEL_TO_SUBJ] $SUBJECT"

:0 c
! iredmail-distribution-list@mydomain.com

5

Re: mailing list and reply-to address

Hi ZhangHuangbin
I'm now totally able to inject a reply-to address in a list using procmail. Access control work too. I will try to assemble some doc and send it to the forum for reference.
Thanks
ciao
gianluca

6

Re: mailing list and reply-to address

Did you try to achieve this with sieve rule?

7 (edited by berni 2013-07-09 19:32:46)

Re: mailing list and reply-to address

excuse me please post the documentation..
i really need help with adding reply to address
and how to use MTA and add user procmail in ldap backend
i still didnt get it from the tutor above