Qmail Archiving: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
[[Category: | [[Category: Energo Group]] | ||
[[Category: Qmail Archiving Issue]] | [[Category: Qmail Archiving Issue]] | ||
Revision as of 10:46, 10 July 2014
Qmail with Openldap Archiving (Copying an email of incomming and outgonig mails)
Qmail Archiving Incoming and Outgoing Emails Directly
In addition to delivering the messages to their respective user mailboxes, it is recommended to have Qmail send a copy of all emails to an archiving mailbox when archiving incoming and outgoing emails directly. This requires certain changes to be made before compiling the Qmail source code. The following guide is an adapted version of the article "Life with Qmail FAQ":
Step 1: Edit extra.h
QUEUE_EXTRA is a compile-time configuration variable that specifies an additional recipient that will be added to every delivery. This is used primarily for logging; the FAQ describes how to use QUEUE_EXTRA to keep copies of all incoming and outgoing messages.
To use QUEUE_EXTRA, edit extra.h specifying the additional recipient in the format Trecipient\0, and the length of the QUEUE_EXTRA string in
- vim /usr/src/qmail/qmail-1.0.3/extra.h
- define QUEUE_EXTRA "Tlogall\0"
- define QUEUE_EXTRALEN 8
Step 2: Recompile Qmail
Shut down Qmail if it's running. If you installed the qmailctl script from the Installation section, this can be done by:
#qmailctl stop
- vim /etc/inittab ; init q
- SV:123456:respawn:/command/svscanboot
Step 3: Recompiling qmail server
Go to the source code directory of the Qmail installation and rebuild Qmail using:
- make setup check
Step 4:-- ldap entry for incoming ang outgoging mail store
We have to mapped an email id with that receipent id that we had define in extra.h. After that all the incomming and outgoing mails will start saving in user's mailbox. We have to add recepient id as mailAlternativeaddress like :--
dn: uid=logall,ou=energoindia.com,dc=energoindia,dc=com mailHost: mail.energoindia.com mailAlternateAddress: logall@mail.energoindia.com objectClass: top objectClass: inetOrgPerson objectClass: qmailUser cn: logall sn: logall mail: logall@energoindia.com accountStatus: active mailMessageStore: energoindia.com/logall uid: logall deliveryMode: noforward userPassword:: e0NSWVBUfXA5R1NiVUVEeGlDUFU=
Step -5 Final confirmation checking logs
- tail -f /var/log/qmail/qmail-send/current | tai64nlocal
2014-06-06 11:42:21.755945500 info msg 21168597: bytes 431477 from <shankar.ivaturi@energoindia.com> qp 19258 uid 510 2014-06-06 11:42:21.755965500 starting delivery 8028: msg 21168597 to local logall@mail.energoindia.com 2014-06-06 11:42:21.755974500 status: local 1/10 remote 13/255 2014-06-06 11:42:21.755992500 starting delivery 8029: msg 21168597 to local kondawar.vivek@energoindia.com 2014-06-06 11:42:21.756000500 status: local 2/10 remote 13/255 2014-06-06 11:42:21.770408500 delivery 8028: success: did_1+0+0/ 2014-06-06 11:42:21.770426500 status: local 1/10 remote 13/255 2014-06-06 11:42:21.770451500 delivery 8029: success: did_1+0+0/ 2014-06-06 11:42:21.770498500 status: local 0/10 remote 13/255 2014-06-06 11:42:21.770527500 end msg 21168597
Refreances :- [1]