Jump to content

Qmail Archiving: Difference between revisions

From TetraWiki
No edit summary
Vijay (talk | contribs)
No edit summary
Line 1: Line 1:
[[Category: ENERGO INDIA]]
[[Category: Qmail Archiving Issue]]


== QMail with Openldap Archiving (Copying an email of incomming and outgonig mails) ==
=='''Qmail with Openldap Archiving (Copying an email of incomming and outgonig mails)'''==




Line 8: Line 10:




== Step 1: Edit extra.h  ==
== '''Step 1: Edit extra.h''' ==




Line 22: Line 24:




== Step 2: Recompile Qmail  ==
== '''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:
Shut down Qmail if it's running. If you installed the qmailctl script from the Installation section, this can be done by:
Line 32: Line 34:




== Step 3: Recompiling qmail server==
== '''Step 3: Recompiling qmail server''' ==


Go to the source code directory of the Qmail installation and rebuild Qmail using:
Go to the source code directory of the Qmail installation and rebuild Qmail using:
Line 39: Line 41:




== Step 4:-- ldap entry for incoming ang outgoging mail store :- ==
== '''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  
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  
Line 60: Line 62:




== Step -5 Final confirmation checking logs ==
== '''Step -5 Final confirmation checking logs''' ==




Line 75: Line 77:
2014-06-06 11:42:21.770498500 status: local 0/10 remote 13/255
2014-06-06 11:42:21.770498500 status: local 0/10 remote 13/255
2014-06-06 11:42:21.770527500 end msg 21168597
2014-06-06 11:42:21.770527500 end msg 21168597
#########################################################################################################




Refreances :- [http://en.help.mailstore.com/Archiving_Emails_from_a_Qmail_Based_Email_Server]
Refreances :- [http://en.help.mailstore.com/Archiving_Emails_from_a_Qmail_Based_Email_Server]

Revision as of 08:57, 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

  1. vim /usr/src/qmail/qmail-1.0.3/extra.h
  1. define QUEUE_EXTRA "Tlogall\0"
  2. 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
  1. vim /etc/inittab ; init q
  2. SV:123456:respawn:/command/svscanboot


Step 3: Recompiling qmail server

Go to the source code directory of the Qmail installation and rebuild Qmail using:

  1. 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

  1. 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]