<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-269688189640615970</atom:id><lastBuildDate>Mon, 11 Feb 2013 03:08:55 +0000</lastBuildDate><category>mail</category><category>unpack</category><category>InLookup "connection pooling" MySQL</category><category>yum indimail RPM OBS "Build Service - openSUSE"</category><category>RPM YUM Repository</category><category>INSTALLATION</category><category>indimail-mini QMQP indimail</category><category>fetchmail</category><category>DKIM DomainKey DomainKeys indimail netqmail qmail qmail-dkim</category><category>"mail server"</category><category>pack</category><category>vpopmail</category><category>"spam filtering" spamassassin indimail "indimail configuration" svctool supervise</category><category>mda</category><category>pop3</category><category>indimail vdelivermail</category><category>indimail systemd</category><category>authenticated SMTP pam-checkpwd vchkpass pam-multi</category><category>"High Performance Mail server"</category><category>QHPSI indimail virus scanner clamav</category><category>ldap indimail addressbook openldap</category><category>bogofilter</category><category>qmail</category><category>envrules qmail-smtpd spawn-filter indimail qmail</category><category>SOX HIPAA "email archiving" indimail qmail-queue "Basel II" MiFID PIPEDA FRCP</category><category>relaying SMTP indimail</category><category>vdelivermail LDA dot-qmail</category><category>indimail</category><category>indimail qmail-send</category><category>vadddomain vdeldomain vadduser vdeluser POST_HOOK indimail</category><category>"instant bulletins" bulletin vbulletin IndiMail bulkmail</category><category>SOX HIPAA "email archiving" indimail altermime filterargs "Basel II" MiFID PIPEDA FRCP</category><category>"spam control" BADIP qmail-smtpd indimail</category><category>indimail "post execution handle"</category><category>indimail ssl tls imaps pop3s smtps</category><category>indimail netqmail qmail greylisting qmail-greyd</category><category>QMQP</category><category>accesslist smtp qmail-smtpd</category><category>indimail mysql "supported MySQL version"</category><category>indimail installation steps</category><category>qmail-remote outgoingip "remote delivery"</category><category>mrtg "mail statistics" indimail</category><category>altermime</category><category>imap</category><category>ripmime</category><category>indimail web "web admin" iwebadmin</category><category>dovecot pam pam-multi nssd pwdlookup NSS</category><category>vlimit vmodddomain indimail quota</category><category>courier-imap</category><category>cdb MySQL "control files" IndiMail qmail</category><category>procmail</category><category>mta</category><category>domain limits vlimit</category><category>administration adminclient indisrvr</category><category>indimail filter</category><title>IndiMail</title><description>IndiMail is a Secure, Reliable, Efficient Messaging Platform which provides you everything needed in a modern messaging server - ESMTP, IMAP, POP3, QMTP, QMQP and many other features.

IndiMail gives you speeds that are faster than most MTAs.

The flexibility provided by IndiMail's authentication methods allow any IMAP/POP3 server to be used with IndiMail.

IndiMail is built for speed and flexibility. You can download the source or use the binary RPM generated by openSUSE Build Service.</description><link>http://indimail.blogspot.com/</link><managingEditor>noreply@blogger.com (Cprogrammer)</managingEditor><generator>Blogger</generator><openSearch:totalResults>46</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Indimail" /><feedburner:info uri="indimail" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>Indimail</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item><guid isPermaLink="false">tag:blogger.com,1999:blog-269688189640615970.post-6754939050690801985</guid><pubDate>Wed, 20 Jul 2011 13:05:00 +0000</pubDate><atom:updated>2011-07-21T15:41:28.349+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">indimail systemd</category><title>Using systemd to start IndiMail</title><description>&lt;a href="http://en.wikipedia.org/wiki/Systemd"&gt;systemd&lt;/a&gt; is a system and service manager for Linux, compatible with SysV and &lt;a href="http://www.linuxfoundation.org/collaborate/workgroups/lsb"&gt;LSB&lt;/a&gt; init scripts. systemd provides aggressive parallelization capabilities, uses socket and D-Bus activation for starting services, offers on-demand starting of daemons, keeps track of processes using Linux cgroups, supports snapshots and restoring of the system state, maintains mount and automount points and implements an elaborate transactional dependency-based service control logic. It can work as a drop-in replacement for sysvinit.&lt;br /&gt;
&lt;br /&gt;
The first step is to write the service configuration file for IndiMail as /lib/systemd/system/indimail.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1.5ex; margin-left: 0px; margin-right: 0px; margin-top: 0.5ex; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;&lt;span class="Apple-style-span" style="background-color: #f1f1e2; color: #222222;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit; line-height: 16px;"&gt;[Unit]
Description=IndiMail Messaging Platform
After=local-fs.target network.target

[Service]
ExecStart=/var/indimail/bin/svscanboot /service
ExecStop=/etc/init.d/indimail stop
Restart=on-failure
Type=simple

[Install]
WantedBy=multi-user.target&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style="font-size: 12px;"&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: white;"&gt;&lt;/span&gt;&lt;br /&gt;
In Fedora 15, upstart has been replaced by a service called &lt;a href="https://fedoraproject.org/wiki/Features/systemd"&gt;systemd&lt;/a&gt;. Due to improper rpm package upgrade scripts, some system services previously enabled in Fedora 14, may not be enabled after upgrading to Fedora 15. To determine if a service is impacted, run the systemctl status command as shown below.&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1.5ex; margin-top: 0.5ex; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: Verdana, Arial, 'Trebuchet MS';"&gt;&lt;span class="Apple-style-span" style="background-color: #f1f1e2; color: black; font-size: 2.6ex; line-height: 16px;"&gt;# &lt;/span&gt;&lt;span class="Apple-style-span" style="background-color: #f1f1e2; color: black; font-size: x-small; line-height: 16px;"&gt;systemctl is-enabled indimail.service &amp;amp;&amp;amp; echo "Enabled on boot" || echo "Disabled on boot"&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;To enable indimail service on boot, run the following systemctl command&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; line-height: 1.1em; margin-bottom: 1.5ex; margin-top: 0.5ex; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;&lt;span class="Apple-style-span" style="background-color: #f1f1e2; color: #222222; font-family: Verdana, Arial, 'Trebuchet MS'; line-height: 16px;"&gt;&lt;span class="Apple-style-span" style="font-size: 2.6ex;"&gt;# &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;systemctl enable indimail.service&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;Now to start IndiMail you can use the usual service command&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1.5ex; margin-left: 0px; margin-right: 0px; margin-top: 0.5ex; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: Verdana, Arial, 'Trebuchet MS'; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;# service indimail start    (to start indimail)&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="background-color: #f1f1e2; color: #222222; font-family: Verdana, Arial, 'Trebuchet MS';"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 1.5ex; margin-left: 0px; margin-right: 0px; margin-top: 0.5ex; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;&lt;span class="Apple-style-span" style="background-color: #f1f1e2; color: #222222; font-family: Verdana, Arial, 'Trebuchet MS';"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: Verdana, Arial, 'Trebuchet MS'; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;# service indimail stop     (to stop indimail)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal;"&gt;&lt;span class="Apple-style-span" style="background-color: #f1f1e2; color: #222222; font-family: Verdana, Arial, 'Trebuchet MS';"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: Verdana, Arial, 'Trebuchet MS'; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;You can automate the above service creation for systemd by running the initsvc(1) command&lt;br /&gt;
&lt;div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal;"&gt;&lt;span class="Apple-style-span" style="background-color: #f1f1e2; color: #222222; font-family: Verdana, Arial, 'Trebuchet MS';"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: Verdana, Arial, 'Trebuchet MS'; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="background-color: #f1f1e2; color: #222222; font-family: Verdana, Arial, 'Trebuchet MS';"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: Verdana, Arial, 'Trebuchet MS'; font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal; margin-bottom: 1.5ex; margin-left: 0px; margin-right: 0px; margin-top: 0.5ex; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;&lt;span class="Apple-style-span" style="background-color: #f1f1e2; color: #222222; font-family: Verdana, Arial, 'Trebuchet MS';"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: Verdana, Arial, 'Trebuchet MS'; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: Verdana, Arial, 'Trebuchet MS'; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;# /var/indimail/bin/initsvc -on  (to enable indimail service)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1.5ex; margin-left: 0px; margin-right: 0px; margin-top: 0.5ex; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;&lt;span class="Apple-style-span" style="background-color: #f1f1e2; color: #222222; font-family: Verdana, Arial, 'Trebuchet MS';"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: Verdana, Arial, 'Trebuchet MS'; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, Arial, 'Trebuchet MS';"&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;# /var/indimail/bin/initsvc -off   (to disable indimail service)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal;"&gt;&lt;span class="Apple-style-span" style="background-color: #f1f1e2; color: #222222; font-family: Verdana, Arial, 'Trebuchet MS';"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: Verdana, Arial, 'Trebuchet MS'; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: Verdana, Arial, 'Trebuchet MS'; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;You can now also query the status of the running IndiMail service by using the systemctl command&lt;br /&gt;
&lt;div style="color: black; font-family: 'Times New Roman'; font-size: medium; line-height: normal;"&gt;&lt;span class="Apple-style-span" style="background-color: #f1f1e2; color: #222222; font-family: Verdana, Arial, 'Trebuchet MS';"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: Verdana, Arial, 'Trebuchet MS'; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="background-color: #f1f1e2; color: #222222; font-family: Verdana, Arial, 'Trebuchet MS';"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: Verdana, Arial, 'Trebuchet MS'; font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1.5ex; margin-left: 0px; margin-right: 0px; margin-top: 0.5ex; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;&lt;span class="Apple-style-span" style="background-color: #f1f1e2; color: #222222; font-family: Verdana, Arial, 'Trebuchet MS';"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: Verdana, Arial, 'Trebuchet MS'; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, Arial, 'Trebuchet MS';"&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;# systemctl status indimail.service&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1.5ex; margin-left: 0px; margin-right: 0px; margin-top: 0.5ex; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;&lt;span class="Apple-style-span" style="background-color: #f1f1e2; color: #222222; font-family: Verdana, Arial, 'Trebuchet MS';"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: Verdana, Arial, 'Trebuchet MS'; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, Arial, 'Trebuchet MS';"&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;indimail.service - IndiMail Messaging Platform
          Loaded: loaded (/lib/systemd/system/indimail.service)
          Active: active (running) since Wed, 20 Jul 2011 18:18:35 +0530; 10min ago
        Main PID: 4353 (svscanboot)
          CGroup: name=systemd:/system/indimail.service
                  ├ 4353 /bin/sh /var/indimail/bin/svscanboot
                  ├ 4356 /var/indimail/bin/svscan /service
                  ├ 4357 supervise log
                  ├ 4358 supervise clamd
                  ├ 4359 supervise log
                  ├ 4360 supervise freshclam
                  ├ 4361 supervise log
                  ├ 4362 supervise qmail-send.25
                  ├ 4363 supervise log
                  ├ 4364 supervise qmail-pop3d-ssl.995
                  ├ 4365 supervise log
                  ├ 4366 supervise proxy-imapd-ssl.9143
                  ├ 4367 supervise log
                  ├ 4368 supervise qmail-poppass.106
                  ├ 4369 supervise log
                  ├ 4370 supervise proxy-imapd.4143
                  ├ 4371 supervise log
                  ├ 4372 supervise proxy-pop3d-ssl.9110
                  ├ 4373 supervise log
                  ├ 4374 supervise qmail-smtpd.465
                  ├ 4375 supervise log
                  ├ 4376 supervise inlookup.infifo
                  ├ 4377 supervise log
                  ├ 4378 supervise qmail-smtpd.366
                  ├ 4379 supervise log
                  ├ 4380 supervise proxy-pop3d.4110
                  ├ 4381 supervise log
                  ├ 4382 supervise slapd.389
                  ├ 4383 supervise log
                  ├ 4384 supervise qmail-smtpd.587
                  ├ 4385 supervise log
                  ├ 4386 supervise pwdlookup
                  ├ 4387 supervise log
                  ├ 4388 supervise qmail-pop3d.110
                  ├ 4389 supervise log
                  ├ 4390 supervise qmail-qmtpd.209
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1.5ex; margin-left: 0px; margin-right: 0px; margin-top: 0.5ex; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;&lt;span class="Apple-style-span" style="background-color: #f1f1e2; color: #222222; font-family: Verdana, Arial, 'Trebuchet MS';"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: Verdana, Arial, 'Trebuchet MS'; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, Arial, 'Trebuchet MS';"&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;                  ├ 4391 supervise log
                  ├ 4392 supervise fetchmail
                  ├ 4393 supervise log
                  ├ 4394 supervise qscanq
                  ├ 4395 supervise log
                  ├ 4396 supervise qmail-smtpd.25
                  ├ 4397 supervise log
                  ├ 4398 supervise mysql.3306
                  ├ 4399 supervise log
                  ├ 4400 supervise qmail-spamlog
                  ├ 4401 supervise log
                  ├ 4402 supervise qmail-qmqpd.628
                  ├ 4403 supervise log
                  ├ 4404 supervise qmail-imapd-ssl.993
                  ├ 4405 supervise log
                  ├ 4406 supervise indisrvr.4000
                  ├ 4407 supervise log
                  ├ 4408 supervise qmail-imapd.143
                  ├ 4409 supervise log
                  ├ 4410 supervise greylist.1999
                  ├ 4411 supervise log
                  ├ 4412 /var/indimail/bin/multilog t /var/log/indimail/fre...
                  ├ 4413 qmail-daemon ./Maildir/
                  ├ 4414 /var/indimail/bin/tcpserver -v -H -R -l 0 -x /var/...
                  ├ 4415 /var/indimail/bin/tcpserver -v -c /service/qmail-p...
                  ├ 4416 /var/indimail/bin/multilog t /var/log/indimail/pro...
                  ├ 4417 /var/indimail/bin/multilog t /var/log/indimail/pop...
                  ├ 4418 /var/indimail/bin/multilog t /var/log/indimail/pro...
                  ├ 4419 /var/indimail/bin/multilog t /var/log/indimail/pro...
                  ├ 4420 /var/indimail/bin/multilog t /var/log/indimail/pop...
                  ├ 4421 /var/indimail/bin/tcpserver -v -c /service/qmail-p...
                  ├ 4422 /var/indimail/bin/multilog t /var/log/indimail/pro...
                  ├ 4424 /var/indimail/bin/tcpserver -v -c /service/proxy-p...
                  ├ 4425 /var/indimail/bin/multilog t -* cleanq starting -*...
                  ├ 4426 /var/indimail/bin/tcpserver -v -h -R -l 0 -x /var/...
                  ├ 4427 /var/indimail/bin/tcpserver -v -c /service/proxy-i...
                  ├ 4428 /var/indimail/sbin/inlookup -i 5
                  ├ 4429 /var/indimail/bin/multilog t /var/log/indimail/mys...
                  ├ 4430 /var/indimail/bin/multilog t /var/log/indimail/smt...
                  ├ 4431 /var/indimail/sbin/nssd -d notice
                  ├ 4432 /var/indimail/bin/tcpserver -v -c /service/qmail-i...
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1.5ex; margin-left: 0px; margin-right: 0px; margin-top: 0.5ex; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;&lt;span class="Apple-style-span" style="background-color: #f1f1e2; color: #222222; font-family: Verdana, Arial, 'Trebuchet MS';"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: Verdana, Arial, 'Trebuchet MS'; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, Arial, 'Trebuchet MS';"&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;                  ├ 4433 /var/indimail/bin/multilog t /var/log/indimail/pwd...
                  ├ 4434 /var/indimail/bin/multilog t /var/log/indimail/smt...
                  ├ 4435 /var/indimail/bin/multilog t /var/log/indimail/pop...
                  ├ 4436 /var/indimail/bin/tcpserver -v -c /service/proxy-i...
                  ├ 4437 /var/indimail/bin/multilog t /var/log/indimail/inl...
                  ├ 4438 /usr/bin/perl /var/indimail/bin/greydaemon -w /var...
                  ├ 4439 /var/indimail/bin/tcpserver -v -c /service/qmail-i...
                  ├ 4440 /var/indimail/bin/tcpserver -v -h -R -l 0 -x /var/...
                  ├ 4441 /var/indimail/bin/multilog t /var/log/indimail/ima...
                  ├ 4442 /var/indimail/bin/tcpserver -v -H -R -l 0 -x /var/...
                  ├ 4443 /var/indimail/bin/multilog t /var/log/indimail/gre...
                  ├ 4444 /usr/local/mysql/libexec/mysqld --defaults-file=/v...
                  ├ 4445 /var/indimail/bin/tcpserver -v -H -R -l 0 -x /var/...
                  ├ 4446 /var/indimail/bin/qmail-cat /tmp/spamfifo
                  ├ 4447 /var/indimail/bin/multilog t /var/log/indimail/fet...
                  ├ 4448 /var/indimail/bin/multilog t /var/log/indimail/qmq...
                  ├ 4449 /var/indimail/bin/multilog t /var/log/indimail/smt...
                  ├ 4450 /var/indimail/bin/multilog t /var/log/indimail/qmt...
                  ├ 4451 /var/indimail/bin/tcpserver -v -H -R -l 0 -x /var/...
                  ├ 4452 /var/indimail/sbin/indisrvr -i 0 -p 4000 -b 40 -n ...
                  ├ 4453 /var/indimail/bin/multilog t /var/log/indimail/ind...
                  ├ 4454 /var/indimail/bin/multilog t /var/log/indimail/smt...
                  ├ 4455 /var/indimail/bin/multilog t /var/log/indimail/cla...
                  ├ 4456 /var/indimail/bin/multilog t /var/log/indimail/svs...
                  ├ 4457 /var/indimail/sbin/clamd
                  ├ 4458 /var/indimail/bin/multilog t /var/log/indimail/del...
                  ├ 4459 /var/indimail/bin/tcpserver -v -c /service/proxy-p...
                  ├ 4460 /var/indimail/bin/multilog t /var/log/indimail/spa...
                  ├ 4461 /var/indimail/bin/multilog t /var/log/indimail/ima...
                  ├ 4462 /bin/sh ./run
                  ├ 4477 /var/indimail/bin/multilog t /var/log/indimail/sla...
                  ├ 4509 /var/indimail/bin/freshclam -v --stdout --datadir=...
                  ├ 4519 /var/indimail/sbin/inlookup -i 5
                  ├ 4520 /var/indimail/sbin/inlookup -i 5
                  ├ 4521 /var/indimail/sbin/inlookup -i 5
                  ├ 4522 /var/indimail/sbin/inlookup -i 5
                  ├ 4523 /var/indimail/sbin/inlookup -i 5
                  ├ 4526 qmail-send
                  ├ 4527 qmail-send
                  ├ 4528 qmail-send
                  ├ 4529 qmail-send
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; margin-bottom: 1.5ex; margin-left: 0px; margin-right: 0px; margin-top: 0.5ex; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;&lt;span class="Apple-style-span" style="background-color: #f1f1e2; color: #222222; font-family: Verdana, Arial, 'Trebuchet MS';"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: Verdana, Arial, 'Trebuchet MS'; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, Arial, 'Trebuchet MS';"&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;                  ├ 4530 qmail-send
                  ├ 4531 qmail-lspawn ./Maildir/
                  ├ 4532 qmail-rspawn
                  ├ 4533 qmail-clean
                  ├ 4534 qmail-todo
                  ├ 4535 qmail-clean
                  ├ 4536 qmail-lspawn ./Maildir/
                  ├ 4537 qmail-rspawn
                  ├ 4538 qmail-clean
                  ├ 4539 qmail-todo
                  ├ 4540 qmail-clean
                  ├ 4541 qmail-lspawn ./Maildir/
                  ├ 4542 qmail-rspawn
                  ├ 4543 qmail-clean
                  ├ 4544 qmail-todo
                  ├ 4545 qmail-clean
                  ├ 4546 qmail-lspawn ./Maildir/
                  ├ 4547 qmail-rspawn
                  ├ 4548 qmail-clean
                  ├ 4549 qmail-todo
                  ├ 4550 qmail-clean
                  ├ 4551 qmail-lspawn ./Maildir/
                  ├ 4552 qmail-rspawn
                  ├ 4553 qmail-clean
                  ├ 4554 qmail-todo
                  ├ 4555 qmail-clean
                  ├ 4751 /bin/sh ./run
                  └ 4752 sleep 200&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="font-size: 12px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Indimail/~4/Wm8b0ZvLVKE" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Indimail/~3/Wm8b0ZvLVKE/using-systemd-to-start-indimail.html</link><author>noreply@blogger.com (Cprogrammer)</author><thr:total>0</thr:total><feedburner:origLink>http://indimail.blogspot.com/2011/07/using-systemd-to-start-indimail.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-269688189640615970.post-1640810815075446643</guid><pubDate>Tue, 05 Jul 2011 14:21:00 +0000</pubDate><atom:updated>2012-08-07T20:43:32.167+05:30</atom:updated><title>IndiMail Installation for newbies in 10 steps</title><description>&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: x-small; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; white-space: pre-wrap;"&gt;&lt;div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"&gt;
&lt;div style="font-size: 19px; font-weight: normal;"&gt;
&lt;/div&gt;
&lt;div class="MsoNormal" style="font-weight: normal; line-height: normal; margin-bottom: 0in;"&gt;
&lt;span class="Heading1Char"&gt;&lt;span style="font-size: 14pt;"&gt;Installing IndiMail from RPM&lt;/span&gt;&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: #d8dce0; background-image: initial; background-origin: initial; color: black; font-family: Arial, sans-serif; font-size: 12pt;"&gt;

&lt;b&gt;1. Install OS&lt;/b&gt;

SUSE
o openSUSE 12.0
o openSUSE 11.4
o openSUSE 11.3
o openSUSE Tumbleweed
o SUSE Linux Enterprise 11 SP1
o SUSE Linux Enterprise 11
o SUSE Linux Enterprise 10
o openSUSE Factory

* Red Hat
o Fedora 17
o Fedora 16
o Red Hat Enterprise Linux 5
o Red Hat Enterprise Linux 6
o CentOS 6
o CentOS 5
o Mandriva_2010.1

* Debian
o Debian 6.0
o Ubuntu 12.04
o Ubuntu 11.10
o Ubuntu 11.04
o Ubuntu 10.10
o Ubuntu 10.04
o Ubuntu 9.10

&lt;b&gt;2. Determine if your OS is 32 bit or 64 Bit&lt;/b&gt;

% uname -m

The command will output i386, i586, i686 for 32 bit and x86_64 for 64 bit

&lt;b&gt;3. Download the Repo correspoding to your OS from*&lt;/b&gt;

&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http%3A%2F%2Fsourceforge.net%2Fprojects%2Findimail%2Ffiles%2FRepo%2F" target="_blank"&gt;&lt;span style="color: #003ea8;"&gt;http://sourceforge.net/projects/indimail/files/Repo/&lt;/span&gt;&lt;/a&gt;

e.g &lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http%3A%2F%2Fsourceforge.net%2Fprojects%2Findimail%2Ffiles%2FRepo%2FIndiMail-CentOS_5.repo%2Fdownload" target="_blank"&gt;&lt;span style="color: #0077aa;"&gt;IndiMail&lt;/span&gt;&lt;/a&gt;&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http%3A%2F%2Fsourceforge.net%2Fprojects%2Findimail%2Ffiles%2FRepo%2FIndiMail-CentOS_5.repo%2Fdownload" target="_blank"&gt;&lt;span style="color: #0077aa;"&gt;-CentOS_5.repo&lt;/span&gt;&lt;/a&gt; for CentOS 5 and copy that to /etc/yum.repos.d
% sudo cp IndiMail-CentOS_5.repo /etc/yum.repos.d/indimail.repo&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-attachment: initial; background-clip: initial; background-color: #d8dce0; background-image: initial; background-origin: initial; color: black; font-family: Arial, sans-serif; font-size: 12pt;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="background-attachment: initial; background-clip: initial; background-color: #d8dce0; background-image: initial; background-origin: initial; color: black; font-family: Arial, sans-serif; font-size: 12pt;"&gt;* for Debian Packages, you need to download the corresponding debian package for your OS from&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-attachment: initial; background-clip: initial; background-color: #d8dce0; background-image: initial; background-origin: initial; color: black; font-family: Arial, sans-serif; font-size: 12pt;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="background-attachment: initial; background-clip: initial; background-color: #d8dce0; background-image: initial; background-origin: initial; color: black; font-family: Arial, sans-serif; font-size: 12pt;"&gt;&lt;a href="http://download.opensuse.org/repositories/home:/indimail"&gt;http://download.opensuse.org/repositories/home:/indimail&lt;/a&gt;

&lt;b&gt;4. Execute the YUM command as per the output of uname command in step &lt;/b&gt;2

% sudo yum install indimail.i386 (for 32 bit)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="font-weight: normal; line-height: normal; margin-bottom: 0in;"&gt;
&lt;span style="background-attachment: initial; background-clip: initial; background-color: #d8dce0; background-image: initial; background-origin: initial; color: black; font-family: Arial, sans-serif; font-size: 12pt;"&gt;% sudo yum install indimail.x86_64 (for 64 bit)&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-attachment: initial; background-clip: initial; background-color: #d8dce0; background-image: initial; background-origin: initial; color: black; font-family: Arial, sans-serif; font-size: 12pt;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="background-attachment: initial; background-clip: initial; background-color: #d8dce0; background-image: initial; background-origin: initial; color: black; font-family: Arial, sans-serif; font-size: 12pt;"&gt;* for debian packages, execute the command&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-attachment: initial; background-clip: initial; background-color: #d8dce0; background-image: initial; background-origin: initial; color: black; font-family: Arial, sans-serif; font-size: 12pt;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="background-attachment: initial; background-clip: initial; background-color: #d8dce0; background-image: initial; background-origin: initial; color: black; font-family: Arial, sans-serif; font-size: 12pt;"&gt;% dpkg -i indimail_version_i386.deb (for 32 bit)&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-attachment: initial; background-clip: initial; background-color: #d8dce0; background-image: initial; background-origin: initial; color: black; font-family: Arial, sans-serif; font-size: 12pt;"&gt;% dpkg -i indimail_version_amd64.deb (for 64 bit)&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-attachment: initial; background-clip: initial; background-color: #d8dce0; background-image: initial; background-origin: initial; color: black; font-family: Arial, sans-serif; font-size: 12pt;"&gt;

The above should install IndiMail

&lt;b&gt;5. Shutdown MySQL if already running and disable MySQL being started up by the system&lt;/b&gt;

% /etc/init.d/mysqld stop
% sudo chkconfig mysqld off
% /bin/rm -f /service/mysql.3306/down
&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-attachment: initial; background-clip: initial; background-color: #d8dce0; background-image: initial; background-origin: initial; color: black; font-family: Arial, sans-serif; font-size: 12pt;"&gt;
&lt;b&gt;6. Start IndiMail&lt;/b&gt;

% sudo service indimail start

&lt;b&gt;7. Check if everthing is fine by running the svstat command&lt;/b&gt;

% sudo /var/indimail/bin/svstat /service/*&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="font-weight: normal; line-height: normal; margin-bottom: 12pt;"&gt;
&lt;span style="background-attachment: initial; background-clip: initial; background-color: #d8dce0; background-image: initial; background-origin: initial; color: black; font-family: Arial, sans-serif; font-size: 12pt;"&gt;/service/clamd: up (pid 1579) 1028 seconds
/service/fetchmail: up (pid 1578) 1028 seconds
/service/freshclam: up (pid 1584) 1028 seconds
/service/greylist.1999: up (pid 1581) 1028 seconds
/service/indisrvr.4000: up (pid 1570) 1028 seconds
/service/inlookup.infifo: up (pid 1568) 1028 seconds
/service/mysql.3306: up (pid 1555) 1029 seconds
/service/proxy-imapd.4143: up (pid 1549) 1029 seconds
/service/proxy-imapd-ssl.9143: up (pid 1548) 1029 seconds
/service/proxy-pop3d.4110: up (pid 1554) 1029 seconds
/service/proxy-pop3d-ssl.9110: up (pid 1583) 1028 seconds
/service/pwdlookup: up (pid 1580) 1028 seconds
/service/qmail-imapd.143: up (pid 1576) 1028 seconds
/service/qmail-imapd-ssl.993: up (pid 1594) 1028 seconds
/service/qmail-pop3d.110: up (pid 1597) 1028 seconds
/service/qmail-pop3d-ssl.995: up (pid 1577) 1028 seconds
/service/qmail-poppass.106: up (pid 1587) 1028 seconds
/service/qmail-qmqpd.628: down 1029 seconds
/service/qmail-qmtpd.209: up (pid 1564) 1029 seconds
/service/qmail-send.25: up (pid 1553) 1029 seconds
/service/qmail-smtpd.25: up (pid 1598) 1028 seconds
/service/qmail-smtpd.366: up (pid 1565) 1029 seconds
/service/qmail-smtpd.465: up (pid 1551) 1029 seconds
/service/qmail-smtpd.587: up (pid 1559) 1029 seconds
/service/qmail-spamlog: up (pid 1552) 1029 seconds
/service/qscanq: up (pid 3802) 29 seconds&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0in;"&gt;
&lt;div style="font-weight: normal;"&gt;
&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: #d8dce0; background-image: initial; background-origin: initial; color: black; font-family: Arial, sans-serif; font-size: 12pt;"&gt;8. Play with the system&lt;/span&gt;&lt;/b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: #d8dce0; background-image: initial; background-origin: initial; color: black; font-family: Arial, sans-serif; font-size: 12pt;"&gt;

Add a domain
% sudo /var/indimail/bin/vadddomain example.com password

Add a user
% sudo /var/indimail/bin/vadduser user01@example.com password

Send an email using SMTP
% swaks --to youremail@yourdomain --from user01@example.com --server localhost

Inject a mail locally
% cat /tmp/email.msg | mail -s "testing indimail" mbhangui@gmail.com you@yourdomain

&lt;b&gt;9. Set up your .bash_profile and RTF&lt;/b&gt;M
PATH=$PATH:/var/indimail/bin:/var/indimail/sbin
MANPATH=$MANPATH:/var/indimail/man

% man indimail

&lt;b&gt;10. Buy beer for Manvendra Bhangui&amp;nbsp;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-weight: normal;"&gt;
&lt;span style="background-attachment: initial; background-clip: initial; background-color: #d8dce0; background-image: initial; background-origin: initial; color: black; font-family: Arial, sans-serif; font-size: 12pt;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="background-attachment: initial; background-clip: initial; background-color: #d8dce0; background-image: initial; background-origin: initial; color: black; font-family: Arial, sans-serif; font-size: 12pt;"&gt;&lt;b&gt;NOTE:&lt;/b&gt;&lt;b style="font-weight: normal;"&gt; &lt;/b&gt;The MySQL database gets installed with the user 'mysql' with all privileges and a user 'indimail' with limited privileges. You will find the passwords for these two users in the script /var/indimail/sbin/svctool. If you modify these, please don't forget to modify /var/indimail/control/host.mysql&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/Indimail/~4/nLOgKb3t2Es" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Indimail/~3/nLOgKb3t2Es/indimail-installation-for-newbies-in-10.html</link><author>noreply@blogger.com (Cprogrammer)</author><thr:total>21</thr:total><georss:featurename>Chennai, Tamil Nadu, India</georss:featurename><georss:point>13.060422 80.24958300000003</georss:point><georss:box>12.916343000000001 80.15782850000004 13.204501 80.34133750000002</georss:box><feedburner:origLink>http://indimail.blogspot.com/2011/07/indimail-installation-for-newbies-in-10.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-269688189640615970.post-2433036238722665918</guid><pubDate>Thu, 30 Jun 2011 16:49:00 +0000</pubDate><atom:updated>2011-07-02T01:54:50.347+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">indimail vdelivermail</category><title>Eliminating Duplicate Emails during local delivery</title><description>Often you will find program like MS outlook, notorious for sending duplicate emails, flooding your inbox. &lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt; allows you to quickly deal with this proprietary nonsense by turning on duplicate eliminator in &lt;b&gt;vdelivermail(8)&lt;/b&gt; - the default &lt;a href="http://en.wikipedia.org/wiki/Mail_delivery_agent"&gt;MDA&lt;/a&gt;. To turn on the duplicate eliminator in vdelivermail, you need to set &lt;b&gt;ELIMINATE_DUPS&lt;/b&gt; and &lt;b&gt;MAKE_SEEKABLE&lt;/b&gt; environment variables.&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;% su&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;# echo 1&amp;gt; /service/qmail-send.25/variables/ELIMINATE_DUPS&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;# echo 1&amp;gt; /service/qmail-send.25/variables/MAKE_SEEKABLE&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;# svc -d /service/qmail-send.25; svc -u /service/qmail-send.25&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;# exit&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
If you do not use vdelivermail and want to use your own delivery agent? Fear not by using &lt;b&gt;ismaildup(1)&lt;/b&gt;. ismaildup expects the email on standard input and is easily scriptable like the example below in a .qmail file.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; | ismaildup /var/indimail/bin/maildirdeliver /home/manny/Maildir&lt;br /&gt;
&lt;br /&gt;
will deliver mails to /home/manny/Maildir while discarding duplicates.&lt;br /&gt;
&lt;br /&gt;
If you are not happy with the 900 seconds (15 minutes) time interval for checking duplicates, you can change it by setting the &lt;b&gt;DUPLICATE_INTERVAL&lt;/b&gt; environment variable. The following will not allow a single duplicate to be entertained within 24 hours&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;% su&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;# echo 86400 &amp;gt; /service/qmail-send.25/variables/DUPLICATE_INTERVAL&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;# svc -d /service/qmail-send.25 ; svc -u /service/qmail-send.25&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;# exit&lt;/span&gt;&lt;img src="http://feeds.feedburner.com/~r/Indimail/~4/bd-Laqc0F0U" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Indimail/~3/bd-Laqc0F0U/eliminating-duplicate-emails-during.html</link><author>noreply@blogger.com (Cprogrammer)</author><thr:total>0</thr:total><feedburner:origLink>http://indimail.blogspot.com/2011/06/eliminating-duplicate-emails-during.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-269688189640615970.post-1462235308828092762</guid><pubDate>Fri, 24 Jun 2011 11:09:00 +0000</pubDate><atom:updated>2011-06-25T14:35:03.699+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">procmail</category><title>Using procmail with Indimail</title><description>&lt;span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;IndiMail follows the traditional UNIX philosophy.&lt;/div&gt;&lt;div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;"Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface"&lt;/div&gt;&lt;div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;This allows IndiMail to interface with many programs written by others. IndiMail uses a powerful filter mechanism called vfilter(8). You may already be familiar with procmail. procmail is a mail delivery agent (MDA) capable of sorting incoming mail into various directories and filtering out messages. There are three ways in which you can use procmail with IndiMail.&lt;/div&gt;&lt;div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;1.&amp;nbsp;&lt;b&gt;inside .qmail&lt;/b&gt;&lt;/div&gt;&lt;div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;Users can use&lt;/div&gt;&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;| preline procmail
&lt;/pre&gt;&lt;div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;from ~/.qmail. They will need to use a full path for procmail unless procmail is in the system's startup PATH.&lt;/div&gt;&lt;div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;2.&amp;nbsp;&lt;b&gt;Edit .qmail-default&lt;/b&gt;&lt;/div&gt;&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;| preline -f procmail -p -m /var/indimail/etc/procmailrc
&lt;/pre&gt;&lt;div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;3.&amp;nbsp;&lt;b&gt;Have an alias&lt;/b&gt;&lt;/div&gt;&lt;div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;You can use valias(1) to create an alias to call procmail. The following alias calls procmail to deliver the mail using /var/indimail/etc/procmailrc as a procmail recipe&lt;/div&gt;&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;&lt;span class="Apple-style-span" style="font-size: xx-small;"&gt;valias -i "|/var/indimail/bin/preline -f /usr/bin/procmail -p -m /var/indimail/etc/procmailrc" testuser@example.co&lt;/span&gt;m
&lt;/pre&gt;&lt;div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;The following procmailrc puts virus infected mails in /tmp/Maildir and calls maildirdeliver(1) to deliver the mail to /home/mail/T2Zsym/example.com/testuser01/Maildir.&lt;/div&gt;&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;&lt;span class="Apple-style-span" style="font-size: xx-small;"&gt;SHELL=/bin/bash
VERBOSE="no"
unset DTLINE
unset RPLINE
:0w
*^X-Virus-Status: INFECTED
/tmp/Maildir/.Virus
:0w
| /var/indimail/bin/maildirdeliver /home/mail/T2Zsym/example.com/testuser01/Maildir&lt;/span&gt;
&lt;/pre&gt;&lt;div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;You can replace maildirdeliver in the last line with vdelivermail(8)&lt;/div&gt;&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;| /var/indimail/bin/vdelivermail ''&lt;b&gt;&lt;i&gt; bounce-no-mailbox&lt;/i&gt;&lt;/b&gt;
&lt;/pre&gt;&lt;a href="" id="Writing_Filters_for_IndiMail" name="Writing_Filters_for_IndiMail" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #002bb8; text-decoration: none;"&gt;&lt;/a&gt;&lt;h2 style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-bottom-width: 1px; color: black; font-size: 19px; font-weight: bold; margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.17em; padding-top: 0.5em;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;br /&gt;
&lt;div&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Indimail/~4/qznXdc0EjwM" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Indimail/~3/qznXdc0EjwM/using-procmail-with-indimail.html</link><author>noreply@blogger.com (Cprogrammer)</author><thr:total>0</thr:total><feedburner:origLink>http://indimail.blogspot.com/2011/06/using-procmail-with-indimail.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-269688189640615970.post-173881349442874112</guid><pubDate>Sat, 18 Jun 2011 05:34:00 +0000</pubDate><atom:updated>2011-09-23T09:09:31.420+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">indimail filter</category><title>Writing Filters for IndiMail</title><description>IndiMail provides multiple methods by which you can intercept an email in transit and modify the email headers or the email body. A filter is a simple program that expects the raw email on standard input and outputs the message text back on standard output. The program /bin/cat can be used as a filter which simply copies the standard input to standard output without modifying anything. Some methods can be used before the mail gets queued and some methods can be used before the execution of local / remote delivery.&lt;br /&gt;&lt;br /&gt;It is not necessary for a filter to modify the email. You can have a filter just to extract the headers or body and use that information for some purpose. IndiMail also provides the following programs - 822addr(1), 822headerfilter(1), 822bodyfilter(1), 822field(1),  822fields(1), 822header(1), 822body(1), 822headerok(1), 822received(1), 822date(1), 822fields(1) to help in processing emails.&lt;br /&gt;&lt;br /&gt;Let us say that we have written a script /usr/local/bin/myfilter. The myfilter program expects the raw email on stdin and outputs the email back (maybe modiying it) on stdout.&lt;h1 class="western"&gt;



&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 19px;"&gt;1.1&amp;nbsp;&lt;b&gt;Filtering during SMTP (before mail gets queued)&lt;/b&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;h1 class="western"&gt;



&lt;span class="Apple-style-span"&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
1.1.1&amp;nbsp;&lt;b&gt;Using FILTERARGS environment variable&lt;/b&gt;&lt;/div&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
The below configuration causes all inbound SMTP email to be fed through the filter /usr/local/bin/myfilter. You can use the programs 822header(1), 822body(1) inside myfilter to get and manipulate the headers and body (See 1.5.1).&lt;/div&gt;
&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;% su root
# echo /usr/local/bin/myfilter &amp;gt; /service/qmail-smtpd.25/variables/FILTERARGS
# svc -d /service/qmail-smtpd.25
# svc -u /service/qmail-smtpd.25
&lt;/pre&gt;
&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;NOTE: If the program myfilter returns 100, the message will be bounced. If it returns 2, the message will be discarded (blackholed).
&lt;/pre&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
1.1.2&amp;nbsp;&lt;b&gt;Using QMAILQUEUE with qmail-qfilter&lt;/b&gt;&lt;/div&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
You can use&amp;nbsp;&lt;b&gt;qmail-qfilter(1)&lt;/b&gt;. qmail-qfilter allows you to run multiple filters passed as command line arguments to qmail-qfilter. Since QMAILQUEUE doesn't allow you to specify multiple arguments, you can write a shell script which calls qmail-qfilter and have the shell script defined as QMAILQUEUE environment variable.&lt;/div&gt;
&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;% su root
# echo /var/indimail/bin/qmail-qfilter /usr/local/bin/myfilter &amp;gt; /usr/local/bin/qfilter
# chmod +x /usr/local/bin/qfilter
# echo /usr/local/bin/qfilter &amp;gt; /service/qmail-smtpd.25/variables/QMAILQUEUE
# echo /var/indimail/bin/qmail-dk &amp;gt; /service/qmail-smtpd.25/variabels/QQF_QMAILQUEUE
# svc -d /service/qmail-smtpd.25
# svc -u /service/qmail-smtpd.25
&lt;/pre&gt;
&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;NOTE: you can define QQF_MAILQUEUE to /var/indimail/bin/qmail-nullqueue to discard the mail (blackhole).
&lt;/pre&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
1.1.3&amp;nbsp;&lt;b&gt;Using QMAILQUEUE with your own program&lt;/b&gt;&lt;/div&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
When you want to use your own program as QMAILQUEUE, then your program is responsible for queuing the email. It is trivial to queue the email by calling qmail-multi(8). You script can read the stdin for the raw message (headers + body) and pipe the output (maybe after modifications) to qmail-multi(8). If you are doing DK/DKIM signing, you can execute qmail-dk(8) instead of qmail-multi(8). You can have qmail-dk(8) call qmail-dkim(8) and qmail-dkim(8) calls qmail-multi(8). Assuming you want to do DK/DKIM signing, and myfilter calls qmail-dk(8), you can do the following&lt;/div&gt;
&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;% su root
# echo /usr/local/bin/myfilter &amp;gt; /service/qmail-smtpd.25/variables/QMAILQUEUE
# echo /var/indimail/bin/qmail-dkim &amp;gt; /service/qmail-smtpd.25/variables/DKQUEUE
# echo /var/indimail/bin/qmail-multi &amp;gt; /service/qmail-smtpd.25/variables/DKIMQUEUE
# svc -d /service/qmail-smtpd.25
# svc -u /service/qmail-smtpd.25
&lt;/pre&gt;
&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;NOTE: You can set the environment variable NULLQUEUE before calling qmail-multi to discard the mail completely (blackhole).
&lt;/pre&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
1.2&amp;nbsp;&lt;b&gt;Filtering during local / remote delivery&lt;/b&gt;&lt;/div&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
1.2.1&amp;nbsp;&lt;b&gt;Using FILTERARGS environment variable&lt;/b&gt;&lt;/div&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
The below configuration causes all local / remote deliveries to be fed through the filter /usr/local/bin/myfilter. You can use the programs 822header(1), 822body(1) inside myfilter to get and manipulate the headers and body.&lt;/div&gt;
&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;% su root
# echo /usr/local/bin/myfilter &amp;gt; /service/qmail-send.25/variables/FILTERARGS
# svc -d /service/qmail-send.25
# svc -u /service/qmail-send.25
&lt;/pre&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
If you want to filter only for local delivery or only for remote delivery, you can use the environment variable QMAILLOCAL or QMAILREMOTE. QMAILLOCAL is defined only for local deliveries while QMAILREMOTE is defined only for remote deliveries.&lt;/div&gt;
&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;NOTE: If the program myfilter returns 100, the message will be bounced. If it returns 2, the message will be discarded (blackholed).
&lt;/pre&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
e.g. the below script skips filtering for remote deliveries&lt;/div&gt;
&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;#!/bin/sh
if [ -n “$QMAILREMOTE” ]&amp;nbsp;; then
    exec /bin/cat
fi
# rest of the script
...
...
exit 0
&lt;/pre&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
1.2.2&amp;nbsp;&lt;b&gt;Using control file filterargs&lt;/b&gt;&lt;/div&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
The control file filterargs gives you control to run filters individually for local or remote deliveries. It also allows you to run your filter for both local and remote deliveries. See spawn-filter(8) for full description on this control file&lt;/div&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
e.g. The following entry in /var/indimail/control/filterargs causes all mails to yahoo.com be fed through the filter dk-filter(8) for DK/DKIM signing.&lt;/div&gt;
&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;yahoo.com:remote:/var/indimail/bin/dk-filter
&lt;/pre&gt;
&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;NOTE: If the program myfilter returns 100, the message will be bounced. If it returns 2, the message will be discarded (blackholed).
&lt;/pre&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
1.2.3&amp;nbsp;&lt;b&gt;Using QMAILLOCAL or QMAILREMOTE environment variables&lt;/b&gt;&lt;/div&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
If you define QMAILLOCAL, indimail will execute the program/script defined by the QMAILLOCAL variable for all local deliveries. The arguments passed to this program/script will be the same as that for qmail-local(8).&lt;/div&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
Similarly, if you define QMAILREMOTE, indimail will execute the program/script defined by the QMAILREMOTE variable for all remote deliveries. The argument passed to this program/script are the same as that for qmail-remote(8).&lt;/div&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
The raw email (header + body) is available on stdin. You can use 822header(8), 822body(8) for getting the headers and body. After your program is through with filtering, the output should be piped to qmail-local(8) for local deliveries and qmail-remote(8) for remote deliveries. You need to also call qmail-local / qmail-remote with the same arguments. i.e&lt;/div&gt;
&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;exec qmail-local  "$@"     #(for local deliveries)
exec qmail-remote "$@"     #(for remote deliveries)
&lt;/pre&gt;
&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;NOTE: You can exit with value 0 instead of calling qmail-local / qmail-remote to discard the mail completely (blackhole)
&lt;/pre&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
1.3&amp;nbsp;&lt;b&gt;Using dot-qmail(5) or valias(1)&lt;/b&gt;&lt;/div&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
&lt;br /&gt;
Both .qmail files and valias mechanism allows you to execute your own programs for local deliveries. See the man pages for dot-qmail(5) and valias(1) for more details. After manipulating the original raw email on stdin, you can pipe the out to the program maildirdeliver(1) for the final delivery.&lt;/div&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
Assuming you write the program myscript to call maildirdeliver program, you can use the valias command to add the following alias&lt;/div&gt;
&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;% valias -i "|/usr/local/bin/myfilter" testuser01@example.com
&lt;/pre&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
Now any mail sent to testuser01@example.com will be given to the program /usr/local/bin/myfilter as standard input.&lt;/div&gt;
&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;NOTE: you can exit with value 0 instead of calling the maildirdeliver program to discard the mail completely (blackhole).
&lt;/pre&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
1.4&amp;nbsp;&lt;b&gt;Using IndiMail rule based filter - vfilter&lt;/b&gt;&lt;/div&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
IndiMail's vfilter(8) mechanism allows you to create rule based filter based on any keyword in the message headers or message body. You can create a vfilter by calling the vcfilter(1) program.&lt;/div&gt;
&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;% vcfilter -i -t myfilter -h 2 -c 0 -k "failure notice" -f /NoDeliver -b "2|/usr/local/bin/myfilter" testuser01@example.com
&lt;/pre&gt;
&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;NOTE: you can exit with value 0 instead of putting anything on standard output to discard the mail completely (blackhole).
&lt;/pre&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
1.5&amp;nbsp;&lt;b&gt;Examples Filters&lt;/b&gt;&lt;/div&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
e.g. the below filter looks for emails having "failure notice" in the subject line and inserts the line "sorry about that" in the first line of the message body and puts the line “sent by IndiMail Messaging platform” in the last line&lt;/div&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
1.5.1&amp;nbsp;&lt;b&gt;FILTERARGS script&lt;/b&gt;&lt;/div&gt;
&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;#bin/sh
# create a temporary file
tmp_file=`mktemp -p /var/tmp -t myfilter.XXXXXXXXXXXXXXX`
if [ $? -ne 0 ]&amp;nbsp;; then
    /bin/rm -f $inp_file
    exit 111
fi
# Copy the stdin
/bin/cat &amp;gt; $tmp_file
if [ $? -ne 0 ]&amp;nbsp;; then
    /bin/rm -f $inp_file
    exit 111
fi
subject=`/var/indimail/bin/822header -I Subject &amp;lt; $tmp_file`
echo $subject | grep "failure notice" &amp;gt; /dev/null 2&amp;gt;&amp;amp;1
if [ $? -eq 0 ]&amp;nbsp;; then
    (
    /var/indimail/bin/822header &amp;lt; $tmp_file
    echo
    echo "sorry about that"
    /var/indimail/bin/822body &amp;lt; $tmp_file
    echo "sent by IndiMail Messaging platform"
    )
else
    /bin/cat $tmp_file
fi
/bin/rm -f $tmp_file
exit 0
&lt;/pre&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
1.5.2&amp;nbsp;&lt;b&gt;QMAILQUEUE script&lt;/b&gt;&lt;/div&gt;
&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;#!/bin/sh
# create a temporary file
inp_file=`mktemp -p /var/tmp -t myfilteri.XXXXXXXXXXXXXXX`
if [ $? -ne 0 ]&amp;nbsp;; then
    /bin/rm -f $inp_file
    exit 111
fi
out_file=`mktemp -p /var/tmp -t myfiltero.XXXXXXXXXXXXXXX`
if [ $? -ne 0 ]&amp;nbsp;; then
    /bin/rm -f $inp_file $out_file
    exit 111
fi
/bin/cat &amp;gt; $inp_file
if [ $? -ne 0 ]&amp;nbsp;; then
    /bin/rm -f $inp_file $out_file
    exit 111
fi
subject=`/var/indimail/bin/822header -I Subject &amp;lt; $inp_file`
echo $subject | grep "failure notice" &amp;gt; /dev/null 2&amp;gt;&amp;amp;1
if [ $? -eq 0 ]&amp;nbsp;; then
    (
    /var/indimail/bin/822header &amp;lt; $inp_file
    echo
    echo "sorry about that"
    /var/indimail/bin/822body &amp;lt; $inp_file
    echo "sent by IndiMail Messaging platform"
    ) &amp;gt; $out_file
    if [ $? -ne 0 ]&amp;nbsp;; then
        /bin/rm -f $inp_file $out_file
        exit 111
    fi
    exec 0&amp;lt;$out_file
else
    exec 0&amp;lt;$inp_file
fi
/bin/rm -f $inp_file $out_file
# queue the message
exec /var/indimail/bin/qmail-multi
exit 111
&lt;/pre&gt;
&lt;div style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
1.5.3&amp;nbsp;&lt;b&gt;QMAILREMOTE script&lt;/b&gt;&lt;/div&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: sans-serif; font-size: 13px; font-weight: normal; line-height: 19px;"&gt;&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;#!/bin/sh
# This scripts expects qmail-remote arguments on command line
# argv0          - qmail-remote
# argv1          - host   (host)
# argv2          - sender (sender)
# argv3          - qqeh   (qmail queue extra header)
# argv4          - size
# argv5 .. argvn - recipients
# 
#
host=$1
sender=$2
qqeh=$3
size=$4
shift 4
#
# if needed you can modify host, sender, qqeh, size args above
#
if [ -z "$QMAILREMOTE" ]&amp;nbsp;; then # execute qmail-local
    # call spawn-filter so that features like
    # FILTERARGS, SPAMFILTER are not lost
    exec -a qmail-local /var/indimail/bin/spawn-filter "$@"
fi
if [ " $CONTROLDIR" = " " ]&amp;nbsp;; then
   FN=/var/indimail/control/filterargs
else
   FN=$CONTROLDIR/filterargs
fi
if [ -n "$SPAMFILTER" -o -n "$FILTERARGS" -o -f $FN ]&amp;nbsp;; then
   # execute spawn-filter if you have filters defined for remote/local deliveries
   PROG="bin/spawn-filter"
else
   PROG="bin/qmail-remote"
fi
# create a temporary file
inp_file=`mktemp -p /var/tmp -t myfilteri.XXXXXXXXXXXXXXX`
if [ $? -ne 0 ]&amp;nbsp;; then
    /bin/rm -f $inp_file
    exit 111
fi
out_file=`mktemp -p /var/tmp -t myfiltero.XXXXXXXXXXXXXXX`
if [ $? -ne 0 ]&amp;nbsp;; then
    /bin/rm -f $inp_file $out_file
    exit 111
fi
/bin/cat &amp;gt; $inp_file
if [ $? -ne 0 ]&amp;nbsp;; then
    /bin/rm -f $inp_file $out_file
    exit 111
fi
subject=`/var/indimail/bin/822header -I Subject &amp;lt; $inp_file`
echo $subject | grep "failure notice" &amp;gt; /dev/null 2&amp;gt;&amp;amp;1
if [ $? -eq 0 ]&amp;nbsp;; then
    (
    /var/indimail/bin/822header &amp;lt; $inp_file
    echo
    echo "sorry about that"
    /var/indimail/bin/822body &amp;lt; $inp_file
    echo "sent by IndiMail Messaging platform"
    ) &amp;gt; $out_file
    if [ $? -ne 0 ]&amp;nbsp;; then
        /bin/rm -f $inp_file $out_file
        exit 111
    fi
    exec 0&amp;lt;$out_file
else
    exec 0&amp;lt;$inp_file
fi
/bin/rm -f $inp_file $out_file
# $PROG points to spawn-filter if FILTERARGS or SPAMFILTER is set
# use $PROG so that features like FILTERARGS, SPAMFILTER are not lost
exec -a qmail-remote $PROG "$host" "$sender" "$qqeh" $size $*
exit 111&lt;/pre&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: sans-serif; font-size: 13px; font-weight: normal; line-height: 19px;"&gt;
&lt;div style="line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;"&gt;
1.5.4&amp;nbsp;&lt;b&gt;QMAILLOCAL script&lt;/b&gt;&lt;/div&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: sans-serif; font-size: 13px; line-height: 19px;"&gt;&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; font-weight: normal; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;#!/bin/sh
# This scripts expects qmail-local arguments on command line
# argv0          - qmail-local
# argv1          - user
# argv2          - homedir
# argv3          - local
# argv4          - dash
# argv5          - ext
# argv6          - domain
# argv7          - sender
# argv8          - defaultdelivery (mbox, Maildir)
# argv9          - qqeh
#
user=$1
homedir=$2
local=$3
dash=$4
ext=$5
domain=$6
sender=$7
defaultdel=$8
qqeh=$9

if [ -z "$QMAILLOCAL" ]&amp;nbsp;; then # execute qmail-remote
    # call spawn-filter so that features like
    # FILTERARGS, SPAMFILTER are not lost
    exec -a qmail-remote /var/indimail/bin/spawn-filter "$@"
fi
# create a temporary file
inp_file=`mktemp -p /var/tmp -t myfilteri.XXXXXXXXXXXXXXX`
if [ $? -ne 0 ]&amp;nbsp;; then
    /bin/rm -f $inp_file
    exit 111
fi
out_file=`mktemp -p /var/tmp -t myfiltero.XXXXXXXXXXXXXXX`
if [ $? -ne 0 ]&amp;nbsp;; then
    /bin/rm -f $inp_file $out_file
    exit 111
fi
/bin/cat &amp;gt; $inp_file
if [ $? -ne 0 ]&amp;nbsp;; then
    /bin/rm -f $inp_file $out_file
    exit 111
fi
subject=`/var/indimail/bin/822header -I Subject &amp;lt; $inp_file`
echo $subject | grep "failure notice" &amp;gt; /dev/null 2&amp;gt;&amp;amp;1
if [ $? -eq 0 ]&amp;nbsp;; then
    (
    /var/indimail/bin/822header &amp;lt; $inp_file
    echo
    echo "sorry about that"
    /var/indimail/bin/822body &amp;lt; $inp_file
    echo "sent by IndiMail Messaging platform"
    ) &amp;gt; $out_file
    if [ $? -ne 0 ]&amp;nbsp;; then
        /bin/rm -f $inp_file $out_file
        exit 111
    fi
    exec 0&amp;lt;$out_file
else
    exec 0&amp;lt;$inp_file
fi
/bin/rm -f $inp_file $out_file

# call spawn-filter so that features like
# FILTERARGS, SPAMFILTER are not lost
exec -a qmail-local /var/indimail/bin/spawn-filter "$@"
exit 111&lt;/pre&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small; font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"&gt;
&lt;div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;
1.5.5&amp;nbsp;&lt;b&gt;valias / vfilter script&lt;/b&gt;&lt;/div&gt;
&lt;pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;"&gt;#!/bin/sh
# create a temporary file
inp_file=`mktemp -p /var/tmp -t myfilteri.XXXXXXXXXXXXXXX`
if [ $? -ne 0 ]&amp;nbsp;; then
    /bin/rm -f $inp_file
    exit 111
fi
out_file=`mktemp -p /var/tmp -t myfiltero.XXXXXXXXXXXXXXX`
if [ $? -ne 0 ]&amp;nbsp;; then
    /bin/rm -f $inp_file $out_file
    exit 111
fi
/bin/cat &amp;gt; $inp_file
if [ $? -ne 0 ]&amp;nbsp;; then
    /bin/rm -f $inp_file $out_file
    exit 111
fi
subject=`/var/indimail/bin/822header -I Subject &amp;lt; $inp_file`
echo $subject | grep "failure notice" &amp;gt; /dev/null 2&amp;gt;&amp;amp;1
if [ $? -eq 0 ]&amp;nbsp;; then
    (
    /var/indimail/bin/822header &amp;lt; $inp_file
    echo
    echo "sorry about that"
    /var/indimail/bin/822body &amp;lt; $inp_file
    echo "sent by IndiMail Messaging platform"
    ) &amp;gt; $out_file
    if [ $? -ne 0 ]&amp;nbsp;; then
        /bin/rm -f $inp_file $out_file
        exit 111
    fi
    exec 0&amp;lt;$out_file
else
    exec 0&amp;lt;$inp_file
fi
/bin/rm -f $inp_file $out_file
#
# unset RPLINE so that maildirdeliver does not add a duplicate Return-Path line
# unset PWSTRUCT so that password structure cached is removed for vuserinfo to
# work correctly
#
unset RPLINE PWSTRUCT
dir=`/var/indimail/bin/vuserinfo -d testuser01@example.com | cut -d: -f2 |cut -c2-`

if [ $? -ne 0 -o " $dir" = " " ]&amp;nbsp;; then
    echo "unable to get user's homedir" 1&amp;gt;&amp;amp;1
    exit 111
fi
exec /var/indimail/bin/maildirdeliver "$dir"/Maildir
exit 111&lt;/pre&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;img src="http://feeds.feedburner.com/~r/Indimail/~4/ywSOmPdAKrc" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Indimail/~3/ywSOmPdAKrc/writing-filters-for-indimail.html</link><author>noreply@blogger.com (Cprogrammer)</author><thr:total>0</thr:total><feedburner:origLink>http://indimail.blogspot.com/2011/06/writing-filters-for-indimail.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-269688189640615970.post-3569640946740838787</guid><pubDate>Fri, 03 Jun 2011 09:21:00 +0000</pubDate><atom:updated>2011-06-19T12:22:36.897+05:30</atom:updated><title>Explanation of email delivery mechanism for local users</title><description>&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;Any email that needs to be delivered needs to be put into a queue before it can be taken up for delivery. Email can be submitted to the queue using qmail-queue command or qmail_open() function. The following programs use the qmail_open() API -&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt; &lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;condredirect,&amp;nbsp;dot-forward,&amp;nbsp;fastforward,&amp;nbsp;filterto,&amp;nbsp;forward,&amp;nbsp;maildirserial,&amp;nbsp;new-inject,&amp;nbsp;ofmipd,&amp;nbsp;qmail-inject,&amp;nbsp;qmail-local,&amp;nbsp;qmail-qmqpd,&amp;nbsp;qmail-qmtpd,&amp;nbsp;qmail-queue,&amp;nbsp;qmail-send,&amp;nbsp;qreceipt,&amp;nbsp;replier,&amp;nbsp;rrforward,&amp;nbsp;qmail-smtpd.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt; &lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;Of these, qmail-smtpd and qmail-qmtpd accept an email for a domain only if the domain is listed in rcpthosts. Once an email is accepted into the queue, qmail-send(8) decides if the mail is to be delivered locally or to a remote address. If the email address corresponds to a domain listed in locals or virtualdomains control file, steps are taken to have the email delivered locally.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;Delivery Mode&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt; &lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;The delivery mode depends on the argument passed to qmail-daemon during startup. The script /service/qmail-send.25/run passes the content of the file /var/indimail/control/defaultdelivery as an argument to qmail-daemon.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt; &lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;See&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;INSTALL.mbox&lt;/span&gt;&lt;/tt&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;,&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;INSTALL.maildir&lt;/span&gt;&lt;/tt&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;, and&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;INSTALL.vsm&lt;/span&gt;&lt;/tt&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&amp;nbsp;for more information.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;To select your default mailbox type, just enter the&amp;nbsp;&lt;i&gt;defaultdelivery&lt;/i&gt;&amp;nbsp;value from the table into&amp;nbsp;&lt;tt&gt;/var/indimail/control/defaultdelivery&lt;/tt&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;e.g., to select the standard&amp;nbsp;&lt;i&gt;qmail&lt;/i&gt;&amp;nbsp;&lt;tt&gt;Mailbox&lt;/tt&gt;&amp;nbsp;delivery, do:&lt;/span&gt;&lt;/div&gt;&lt;pre style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;echo ./Maildir/ &amp;gt;/var/indimail/control/defaultdelivery&lt;/span&gt;&lt;/pre&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;Addresses&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Once you have decided the delivery mode above, one needs to have some mechanism to assign a local address for the delivery. qmail (which is what IndiMail uses) offers the following mechanism&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;locals&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;Any email addressed to&amp;nbsp;&lt;i&gt;user&lt;/i&gt;@&lt;i&gt;domain&lt;/i&gt;&amp;nbsp;listed in the file&amp;nbsp;&lt;b&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;/var/indimail/control/locals&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&amp;nbsp;will be delivered to the local user&amp;nbsp;&lt;b&gt;&lt;i&gt;user&lt;/i&gt;&lt;/b&gt;. If you have Maildir as the delivery mode and an email to user kanimoji@domain, with home directory /home/blackmoney, will be delivered to /home/blackmoney/Maildir/new&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;virtualdomains&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;The control file /var/indimail/control/virtualdomains allows you to have multiple domains configured on a single server. Entries in virtualdomains are&amp;nbsp;of the form:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;pre style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;
&lt;/span&gt;&lt;/i&gt;&lt;/pre&gt;&lt;pre style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;i&gt;&lt;b&gt;user&lt;/b&gt;&lt;/i&gt;&lt;b&gt;@&lt;/b&gt;&lt;i&gt;&lt;b&gt;domain&lt;/b&gt;&lt;/i&gt;&lt;b&gt;:&lt;/b&gt;&lt;i&gt;&lt;b&gt;prepend&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;i&gt;qmail&lt;/i&gt;&amp;nbsp;converts&amp;nbsp;&lt;tt&gt;&lt;i&gt;user&lt;/i&gt;@&lt;i&gt;domain&lt;/i&gt;&lt;/tt&gt;&amp;nbsp;to&amp;nbsp;&lt;tt&gt;&lt;i&gt;prepend&lt;/i&gt;-&lt;i&gt;user&lt;/i&gt;@&lt;i&gt;domain&lt;/i&gt;&lt;/tt&gt;&amp;nbsp;and treats the result as if&amp;nbsp;&lt;tt&gt;&lt;i&gt;domain&lt;/i&gt;&lt;/tt&gt;&amp;nbsp;was local. The&amp;nbsp;&lt;tt&gt;&lt;i&gt;user&lt;/i&gt;@&lt;/tt&gt;&amp;nbsp;part is optional. If it's omitted, the entry matches&amp;nbsp;all&amp;nbsp;&lt;tt&gt;@&lt;i&gt;domain&lt;/i&gt;&lt;/tt&gt;&amp;nbsp;addresses.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;When you run the command&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;b&gt;&lt;i&gt;vadddomain example.com some_password&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;It will add the following entry in virtualdomains control file&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;b&gt;&lt;i&gt;example.com:example.com&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;What this means is that any email addressed to&lt;i&gt;&amp;nbsp;user@example.com&lt;/i&gt;&amp;nbsp;will be delivered to the address&amp;nbsp;&lt;i&gt;example.com-user@example.com&lt;/i&gt;.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;IndiMail further uses qmail-users mechanism to deliver the email for users in a virtual domain. This is explained &amp;nbsp;below&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;qmail-users&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;pre style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;The file &lt;b&gt;/var/indimail/users/assign&lt;/b&gt; assigns addresses to users.
&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/pre&gt;&lt;pre style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif; white-space: normal;"&gt;&lt;pre style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/pre&gt;&lt;pre style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;A simple assignment is a line of the form&lt;/span&gt;
&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;
&lt;b&gt;&lt;i&gt;=local:user:uid:gid:homedir:dash:ext:&lt;/i&gt;&lt;/b&gt;

Here &lt;i&gt;local&lt;/i&gt; is an address; &lt;i&gt;user&lt;/i&gt;, &lt;i&gt;uid&lt;/i&gt;, and &lt;i&gt;gid&lt;/i&gt; are the account name, uid, and gid o the user in charge of &lt;i&gt;local&lt;/i&gt;; and messages to &lt;i&gt;local&lt;/i&gt; will be controlled by&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;pre style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;span class="Apple-style-span" style="white-space: normal;"&gt;&lt;pre style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif; white-space: normal;"&gt;&lt;pre style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;i&gt;homedir&lt;/i&gt;&lt;b&gt;/.qmail&lt;/b&gt;&lt;i&gt;dashext&lt;/i&gt;.&lt;/pre&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;pre style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;div style="white-space: normal;"&gt;&lt;pre style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;If there are several assignments for the same &lt;i&gt;local&lt;/i&gt; address, &lt;b&gt;qmail-lspawn&lt;/b&gt; will use the first one&lt;/span&gt;. &lt;i style="font-family: Times, 'Times New Roman', serif;"&gt;local&lt;/i&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt; is interpreted without regard to case.&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/pre&gt;&lt;pre style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="white-space: normal;"&gt;&lt;pre style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;pre style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="white-space: normal;"&gt;&lt;pre style="font-family: 'Times New Roman'; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;A wildcard assignment is a line of the form&lt;span class="Apple-style-span" style="white-space: normal;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif; white-space: normal;"&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: 'Times New Roman'; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;div style="font-family: 'Times New Roman';"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="white-space: normal;"&gt;&lt;pre style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif; white-space: normal;"&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif; white-space: normal;"&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;b&gt;&lt;i&gt;+loc:user:uid:gid:homedir:dash:pre:&lt;/i&gt;&lt;/b&gt;

This assignment applies to any address beginning with &lt;i&gt;loc&lt;/i&gt;, including &lt;i&gt;loc&lt;/i&gt; itself. &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;It means the same as

&lt;b&gt;&lt;i&gt;=locext:user:uid:gid:homedir:dash:preext:&lt;/i&gt;&lt;/b&gt;

for every string &lt;i&gt;ext&lt;/i&gt;.
&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;When you add a virtualdomain using vadddomain, you will have the following entry&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;i&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;+example.com-:example.com:555:555:/var/indimail/domains/example.com:-::&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;As stated earlier, &amp;nbsp;any email addressed to&amp;nbsp;&lt;i&gt;user@example.com&lt;/i&gt;&amp;nbsp;will be delivered to local user&amp;nbsp;&lt;i&gt;example.com-user@example.com&lt;/i&gt;&amp;nbsp;because of&amp;nbsp;&lt;i&gt;virtualdomains&lt;/i&gt;&amp;nbsp;control file. The above address can be looked as&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;b&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;=user@example.com:example.com:555:555:/var/indimail/domains/example.com:-:user:&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;So you can see that emails are controlled by .qmail-user in the directory /var/indimail/domains/example.com. if .qmail-user does not exist, then .qmail-default will be used&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;Adding the entry&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;i&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;+example.com-customer_care-:example.com:555:555:/var/indimail/domains/example.com/cc:-::&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;will cause emails to customer_care-delhi@example.com, customer_care-mumba@example.com, etc to be handled by /var/indimail/domains/cc/.qmail-default (if .qmail-customer_care-delhi does does not exist).&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;Extension Addresses&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;pre style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;In the &lt;b&gt;qmail&lt;/b&gt; system, you control all local addresses of the form &lt;i&gt;user&lt;/i&gt;&lt;b&gt;-&lt;/b&gt;&lt;i&gt;anything&lt;/i&gt;, as well as the address &lt;i&gt;user&lt;/i&gt; itself, where &lt;i&gt;user&lt;/i&gt; is your account name.  Delivery to &lt;i&gt;user&lt;/i&gt;&lt;b&gt;-&lt;/b&gt;&lt;i&gt;anything&lt;/i&gt; is controlled by the file &lt;i&gt;homedir&lt;/i&gt;/&lt;b&gt;.qmail-&lt;/b&gt;&lt;i&gt;anything&lt;/i&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;. (These rules may be changed by editing the assign file as given above in qmail-users.
&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;The &lt;b&gt;alias&lt;/b&gt; user controls all other addresses.  Delivery to &lt;i&gt;user&lt;/i&gt; is controlled by the file &lt;i&gt;homedir&lt;/i&gt;/&lt;b&gt;.qmail-&lt;/b&gt;&lt;i&gt;user&lt;/i&gt;, where &lt;i&gt;homedir&lt;/i&gt; is &lt;b&gt;alias&lt;/b&gt;'s home directory.

In the following description, &lt;b&gt;qmail-local&lt;/b&gt; is handling a message addressed to &lt;i&gt;local&lt;/i&gt;@&lt;i&gt;domain&lt;/i&gt;, where &lt;i&gt;local&lt;/i&gt; is controlled by &lt;b&gt;.qmail-&lt;/b&gt;&lt;i&gt;ext&lt;/i&gt;.  Here is what it does.

If &lt;b&gt;.qmail-&lt;/b&gt;&lt;i&gt;ext&lt;/i&gt; is completely empty, &lt;b&gt;qmail-local&lt;/b&gt; follows the &lt;i&gt;defaultdelivery&lt;/i&gt; instructions set by your system administrator.

If &lt;b&gt;.qmail-&lt;/b&gt;&lt;i&gt;ext&lt;/i&gt; doesn't exist, &lt;b&gt;qmail-local&lt;/b&gt; will try some default &lt;b&gt;.qmail&lt;/b&gt; files.  For example, if &lt;i&gt;ext&lt;/i&gt; is &lt;b&gt;foo-bar&lt;/b&gt;, &lt;b&gt;qmail-local&lt;/b&gt; will try first &lt;b&gt;.qmail-foo-bar&lt;/b&gt;, then &lt;b&gt;.qmail-foo-&lt;/b&gt;&lt;b&gt;default&lt;/b&gt;, and finally &lt;b&gt;.qmail-default&lt;/b&gt;.  If none of these exist, &lt;b&gt;qmail-local&lt;/b&gt; will bounce the message.  (Exception: for the basic &lt;i&gt;user&lt;/i&gt; address, &lt;b&gt;qmail-local&lt;/b&gt; treats a nonexistent &lt;b&gt;.qmail&lt;/b&gt; the same as an empty &lt;b&gt;.qmail&lt;/b&gt;.)
&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;The vadddomain command creates the file .qmail-default in /var/domain/domains/domain_name. Hence any email addressed to user@example.com gets controlled by /var/indimail/domains/example.com/.qmail-default.&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;
&lt;b&gt;WARNING:&lt;/b&gt; For security, &lt;b&gt;qmail-local&lt;/b&gt; replaces any dots in &lt;i&gt;ext&lt;/i&gt; with colons before checking &lt;b&gt;.qmail-&lt;/b&gt;&lt;i&gt;ext&lt;/i&gt;.  For convenience, &lt;b&gt;qmail-local&lt;/b&gt; converts any uppercase letters in &lt;i&gt;ext&lt;/i&gt; to lowercase.&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Indimail/~4/ibVV4vyb4F0" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Indimail/~3/ibVV4vyb4F0/explanation-of-email-delivery-mechanism.html</link><author>noreply@blogger.com (Cprogrammer)</author><thr:total>0</thr:total><feedburner:origLink>http://indimail.blogspot.com/2011/06/explanation-of-email-delivery-mechanism.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-269688189640615970.post-2104617470698585530</guid><pubDate>Fri, 22 Apr 2011 08:28:00 +0000</pubDate><atom:updated>2011-04-22T13:58:50.502+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">InLookup "connection pooling" MySQL</category><title>Database Connections made by IndiMail</title><description>&lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt; uses MySQL for storing information of virtual domain users. The table '&lt;b&gt;indimail&lt;/b&gt;' stores important user information like password, access permissions, quota and the mailbox path. Most of user related queries have to lookup the '&lt;b&gt;indimail&lt;/b&gt;' table in MySQL.&lt;br /&gt;
&lt;br /&gt;
Rather than making individual connections to MySQL for extracting information from the '&lt;b&gt;indimail&lt;/b&gt;' table, IndiMail programs use the service of the &lt;b&gt;InLookup(8)&lt;/b&gt; server. Programs use an API function &lt;b&gt;inquery()&lt;/b&gt; to request service. &amp;nbsp;InLookup &amp;nbsp;is &amp;nbsp;a connection pooling server to serve requests for inquery() function. It&amp;nbsp;is implemented over two fifos. One fixed fifo for reading the query &amp;nbsp;and &amp;nbsp;reading &amp;nbsp;the&amp;nbsp;&amp;nbsp;path of a randomly generated fifo. The randomly generated fifo is used for writing the&amp;nbsp;result of the query back.&amp;nbsp;InLookup &amp;nbsp;helps &amp;nbsp;in optimizing connection to MySQL(1), by keeping the connections persistent. &amp;nbsp;IndiMail clients send requests for MySQL(1) queries to InLookup through the function &amp;nbsp;inquery() &amp;nbsp;using &amp;nbsp;a &amp;nbsp;fifo. The inquery() API uses the InLookup service only if the environment variable QUERY_CACHE is set. If this environment variable is not set, the inquery() funcation makes a direct connecton to MySQL. Clients which are currently using inquery are&amp;nbsp;qmail-smtpd(1), proxyimap(8), proxypop3(8), vchkpass(8) and authindi(8). InLookup(8) service is one of the reasons why IndiMail is able to serve million+ users using commodity hardware.&lt;br /&gt;
&lt;br /&gt;
The &amp;nbsp;program &amp;nbsp;inquerytest simulates all the queries which InLookup supports and can be&amp;nbsp;used as a test/diagnostic tool for submitting queries to InLookup.&lt;img src="http://feeds.feedburner.com/~r/Indimail/~4/BN3lyRhjtuc" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Indimail/~3/BN3lyRhjtuc/database-connections-made-by-indimail.html</link><author>noreply@blogger.com (Cprogrammer)</author><thr:total>0</thr:total><feedburner:origLink>http://indimail.blogspot.com/2011/04/database-connections-made-by-indimail.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-269688189640615970.post-7093918044189099627</guid><pubDate>Fri, 15 Apr 2011 15:12:00 +0000</pubDate><atom:updated>2011-04-15T20:42:42.175+05:30</atom:updated><title>Plugin for qmail-smtpd</title><description>&lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt; now has a plugin functionality for qmail-smtpd. You can write your own plugin to carry out tasks during the MAIL, RCPT or the DATA phase of SMTP. &amp;nbsp;See the man page for &lt;b&gt;plugin_init(3)&lt;/b&gt; for details.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;NAME&lt;/b&gt;&lt;br /&gt;
plugin_init() - Template for Dynamic SMTP Plugins&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;SYNTAX&lt;/b&gt;&lt;br /&gt;
#include smtp_plugin.h&lt;br /&gt;
&lt;br /&gt;
char *from_plug(char *rip, char *from, char **mesg);&lt;br /&gt;
&lt;br /&gt;
char *rcpt_plug(char *rip, char *from, char *rcpt, char **mesg);&lt;br /&gt;
&lt;br /&gt;
char *data_plug(char *local, char *rip, char *rhost, char *rinfo, char **mesg);&lt;br /&gt;
&lt;br /&gt;
PLUGIN *plugin_init();&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
int             (*mail_func) (char *, char *, char **);&lt;br /&gt;
int             (*rcpt_func) (char *, char *, char *, char **);&lt;br /&gt;
int             (*data_func) (char *, char *, char *, char *, char **);&lt;br /&gt;
} PLUGIN;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;DESCRIPTION&lt;/b&gt;&lt;br /&gt;
PLUGIN  structure  has three components: mail_func is a pointer to function to be exe‐&lt;br /&gt;
cuted in the SMTP MAIL session.  rcpt_func is a pointer to function to be executed  in&lt;br /&gt;
the  SMTP RCPT session.  data_func is a pointer to function to be executed in the SMTP&lt;br /&gt;
DATA session.&lt;br /&gt;
&lt;br /&gt;
To write a SMTP plugin you have to write  the  plugin_init()  function.  Depending  on&lt;br /&gt;
which  phase  of  SMTP  (MAIL, RCPT, DATA) you want to call your function, you have to&lt;br /&gt;
write the from_plug, rcpt_plug, data_plug functions.&lt;br /&gt;
&lt;br /&gt;
The plugin_init() function can be written as below&lt;br /&gt;
&lt;br /&gt;
PLUGIN         *&lt;br /&gt;
plugin_init()&lt;br /&gt;
{&lt;br /&gt;
static PLUGIN   plug;&lt;br /&gt;
PLUGIN         *ptr;&lt;br /&gt;
&lt;br /&gt;
ptr = &amp;amp;plug;&lt;br /&gt;
ptr-&amp;gt;mail_func = from_plug;&lt;br /&gt;
ptr-&amp;gt;rcpt_func = rcpt_plug;&lt;br /&gt;
ptr-&amp;gt;data_func = data_plug;&lt;br /&gt;
return &amp;amp;plug;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
To compile the plugin you can use gcc(1).&lt;br /&gt;
&lt;br /&gt;
gcc -shared -rdynamic -nostartfiles -fPIC -s -O4 -o smtpd-plugin.so smtp_plugin.o&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;RETURN VALUE&lt;/b&gt;&lt;br /&gt;
The functions from_plug, rcpt_plug, data_plug must return 0 on  success.  These  func‐&lt;br /&gt;
tions  should  return  1  to terminate the sesson with a message. You can set your own&lt;br /&gt;
message by assigning mesg variable. If you have the below function in smtpd-plugin.so&lt;br /&gt;
&lt;br /&gt;
int&lt;br /&gt;
rcpt_plug(char *remoteip, char *from, char *rcpt, char **mesg)&lt;br /&gt;
{&lt;br /&gt;
if (!strstr(rcpt, "@yahoo.com"))&lt;br /&gt;
{&lt;br /&gt;
*mesg = "530 We are serious and don't Yahoo (#5.7.1)&lt;br /&gt;
return (1);&lt;br /&gt;
}&lt;br /&gt;
return (0);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;SEE ALSO&lt;/b&gt;&lt;br /&gt;
qmail-smtpd(8), dlopen(3), gcc(1)&lt;img src="http://feeds.feedburner.com/~r/Indimail/~4/0I7pBL3cJL8" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Indimail/~3/0I7pBL3cJL8/plugin-for-qmail-smtpd.html</link><author>noreply@blogger.com (Cprogrammer)</author><thr:total>0</thr:total><feedburner:origLink>http://indimail.blogspot.com/2011/04/plugin-for-qmail-smtpd.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-269688189640615970.post-7538297959941938920</guid><pubDate>Fri, 01 Apr 2011 10:02:00 +0000</pubDate><atom:updated>2011-04-01T15:34:46.414+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">administration adminclient indisrvr</category><title>The AdminClient Protocol</title><description>IndiMail provides close to around 300 different programs as part of a flexible Enterprise Messaging Platform. You can carry administer the entire platform with around 45 of these programs. A program called &lt;b&gt;indisrvr(8)&lt;/b&gt; provides a way for users to secure execute these commands from any remote location. To execute these programs, you need to have an admin account on the IndiMail server. These accounts can be created by the &lt;b&gt;mgmtpass(8)&lt;/b&gt;&amp;nbsp;program. Once you have an admin account on the IndiMail server, you can further restrict users to certain programs using the &lt;b&gt;vpriv(8)&lt;/b&gt; program. vpriv can further modify privileges by allowing only certain options within a allowed program.&lt;br /&gt;
&lt;br /&gt;
To execute these programs on the IndiMail server, you need to connect to port 4000 and use the adminclient protocol. The adminclient protocol is described below by showing a conversation between a client and the server 'indisrvr'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
s - denotes server&lt;br /&gt;
c - denotes client&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s: "Login: "&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;c: "userid\n"&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s: "Password: "&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;c: "password\n"&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s: "OK\n"&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;c: "index command arg1 arg2 ...\n"&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s: &lt;output above="" any="" command="" if="" of=""&gt;&lt;/output&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;c: "\n"&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s: "RETURNSTATUS[return value of command]\n"&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;To execute 'vuserinfo' you will need to do the following.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;% telnet 0 4000&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Trying 0.0.0.0...&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Connected to 0.&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Escape character is '^]'.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Login: admin&lt;lf&gt;&lt;/lf&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Password: benhur20&lt;lf&gt;&lt;/lf&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;OK&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;7 vuserinfo -n manvendra@indimail.org&lt;lf&gt;&lt;/lf&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: manvendra@indimail.org&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;lf&gt;&lt;/lf&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RETURNSTATUS0&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Index value of '7' was used for vuserinfo. A privileged user 'admin' with password 'benhur20' was used to execute vuserinfo. Each command has an index. The values are given as below.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;Index Commands&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;----- --------&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;00 &amp;nbsp; &amp;nbsp;vadduser&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;01 &amp;nbsp; &amp;nbsp;vpasswd&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;02 &amp;nbsp; &amp;nbsp;vdeluser&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;03 &amp;nbsp; &amp;nbsp;vsetuserquota&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;04 &amp;nbsp; &amp;nbsp;vbulletin&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;05 &amp;nbsp; &amp;nbsp;vmoduser&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;06 &amp;nbsp; &amp;nbsp;valias&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;07 &amp;nbsp; &amp;nbsp;vuserinfo&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;08 &amp;nbsp; &amp;nbsp;vipmap&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;09 &amp;nbsp; &amp;nbsp;vacation&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;10 &amp;nbsp; &amp;nbsp;vmoveuser&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;11 &amp;nbsp; &amp;nbsp;vrenameuser&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;12 &amp;nbsp; &amp;nbsp;crc&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;13 &amp;nbsp; &amp;nbsp;vcfilter&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;14 &amp;nbsp; &amp;nbsp;indiversion&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;15 &amp;nbsp; &amp;nbsp;vsmtp&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;16 &amp;nbsp; &amp;nbsp;dbinfo&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;17 &amp;nbsp; &amp;nbsp;vhostid&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;18 &amp;nbsp; &amp;nbsp;mgmtpass&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;19 &amp;nbsp; &amp;nbsp;inquerytest&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;20 &amp;nbsp; &amp;nbsp;printdir&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;21 &amp;nbsp; &amp;nbsp;shit&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;22 &amp;nbsp; &amp;nbsp;vaddaliasdomain&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;23 &amp;nbsp; &amp;nbsp;vadddomain&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;24 &amp;nbsp; &amp;nbsp;vcalias&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;25 &amp;nbsp; &amp;nbsp;vcaliasrev.sh&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;26 &amp;nbsp; &amp;nbsp;vconvert&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;27 &amp;nbsp; &amp;nbsp;vdeldomain&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;28 &amp;nbsp; &amp;nbsp;vrenamedomain&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;29 &amp;nbsp; &amp;nbsp;vdominfo&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;30 &amp;nbsp; &amp;nbsp;vfstab&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;31 &amp;nbsp; &amp;nbsp;vgroup&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;32 &amp;nbsp; &amp;nbsp;vatrn&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;33 &amp;nbsp; &amp;nbsp;vpriv&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;34 &amp;nbsp; &amp;nbsp;vlimit&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;35 &amp;nbsp; &amp;nbsp;hostcntrl&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;36 &amp;nbsp; &amp;nbsp;execmysql&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;37 &amp;nbsp; &amp;nbsp;updatefile&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;38 &amp;nbsp; &amp;nbsp;vreorg&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;39 &amp;nbsp; &amp;nbsp;vdeloldusers&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;40 &amp;nbsp; &amp;nbsp;ipchange&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;41 &amp;nbsp; &amp;nbsp;svctool&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;42 &amp;nbsp; &amp;nbsp;clearopensmtp&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;43 &amp;nbsp; &amp;nbsp;hostsync&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;44 &amp;nbsp; &amp;nbsp;inquerytest&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;
&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;45 &amp;nbsp; &amp;nbsp;vmoddomain&lt;/span&gt;&lt;/tt&gt; &lt;/div&gt;&lt;div&gt;&lt;tt&gt;&lt;span style="color: #1a1a1a;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/tt&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #1a1a1a; font-family: monospace;"&gt;If you have a user provisioning interface written in your favourite language, you can connect to the port 4000 and execute the above programs. IndiMail also provides you a command line program '&lt;b&gt;adminclient&lt;/b&gt;' which can execute any of the above programs. Read the man page for adminclient for further details.&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-3ktq1wdqA54/TZWjH_JLMxI/AAAAAAAABd4/I56-AhzcAQM/s1600/adminclient.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-3ktq1wdqA54/TZWjH_JLMxI/AAAAAAAABd4/I56-AhzcAQM/s320/adminclient.png" width="311" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: #1a1a1a; font-family: monospace;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Indimail/~4/nzZlxapqXIg" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Indimail/~3/nzZlxapqXIg/adminclient-protocol.html</link><author>noreply@blogger.com (Cprogrammer)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-3ktq1wdqA54/TZWjH_JLMxI/AAAAAAAABd4/I56-AhzcAQM/s72-c/adminclient.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://indimail.blogspot.com/2011/04/adminclient-protocol.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-269688189640615970.post-9154348977706867862</guid><pubDate>Sat, 08 Jan 2011 05:10:00 +0000</pubDate><atom:updated>2011-07-03T17:21:09.030+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">qmail-remote outgoingip "remote delivery"</category><title>Distributing your outgoing mails from Multiple IP addresses</title><description>Some mail providers like hotmail, yahoo restrict the number of connections from a single IP and&amp;nbsp;the number of mails that can be delivered in an hour from a single IP. To increase your ability&amp;nbsp;to deliver large number of genuine emails from your users to such sites, you may want to send out mails from multiple IP addresses.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt; has the ability to call a custom program instead of &lt;b&gt;qmail-local(8)&lt;/b&gt; or &lt;b&gt;qmail-remote(8)&lt;/b&gt;.&amp;nbsp;This is done by defining the environment variable QMAILLOCAL or QMAILREMOTE. &lt;b&gt;qmail-remote(8)&lt;/b&gt; can&amp;nbsp;use the environment variable OUTGOINGIP to set the IP address of the local interface when making&amp;nbsp;outgoing connections. By writing a simple script and setting QMAILREMOTE environment variable&amp;nbsp;pointing to this script, one can randomly chose an IP address from the control file&lt;br /&gt;
&lt;br /&gt;
/var/indimail/control/outgoingip&lt;br /&gt;
&lt;br /&gt;
The script below also allows you to define multiple outgoing&amp;nbsp;IP addresses for a single host. e.g. you can create the control file&amp;nbsp;to send out mails from multiple IPs only for the domain hotmail.com&lt;br /&gt;
&lt;br /&gt;
/var/indimail/control/outgoingip.hotmail.com&lt;br /&gt;
&lt;br /&gt;
Let us name the below script balance_outgoing&lt;br /&gt;
&lt;br /&gt;
% su&lt;br /&gt;
# echo "/var/indimail/bin/balance_outgoing" &amp;gt; /service/qmail-send.25/variables/QMAILREMOTE&lt;br /&gt;
# svc -d /service/qmail-send.25&lt;br /&gt;
# svc -u /service/qmail-send.25&lt;br /&gt;
# exit&lt;br /&gt;
%&lt;br /&gt;
&lt;br /&gt;
Finally the balance_outgoing script can be placed with execute bit in /var/indimail/bin&lt;br /&gt;
&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# This scripts expects qmail-remote arguments on command line&lt;br /&gt;
# argv0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- qmail-remote&lt;br /&gt;
# argv1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- host &amp;nbsp; (host)&lt;br /&gt;
# argv2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- sender (sender)&lt;br /&gt;
# argv3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- qqeh &amp;nbsp; (qmail queue extra header)&lt;br /&gt;
# argv4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- size&lt;br /&gt;
# argv5 .. argvn - recipients&lt;br /&gt;
# &lt;br /&gt;
#&lt;br /&gt;
host=$1&lt;br /&gt;
sender=$2&lt;br /&gt;
&lt;div&gt;&lt;div&gt;qqeh=$3&lt;/div&gt;&lt;div&gt;size=$4&lt;/div&gt;&lt;div&gt;shift 4&lt;br /&gt;
&lt;br /&gt;
cd /var/indimail&lt;/div&gt;&lt;div&gt;if [ " $CONTROLDIR" = " " ] ; then&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;FN=/var/indimail/control/filterargs&lt;/div&gt;&lt;div&gt;else&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;FN=$CONTROLDIR/filterargs&lt;/div&gt;&lt;div&gt;fi&lt;/div&gt;&lt;div&gt;if [ -n "$SPAMFILTER" -o -n "$FILTERARGS" -o -f $FN ] ; then&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;# execute spawn-filter if you have filters defined for remote/local deliveries&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;PROG="bin/spawn-filter"&lt;/div&gt;&lt;div&gt;else&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;PROG="bin/qmail-remote"&lt;/div&gt;&lt;div&gt;fi&lt;/div&gt;&lt;div&gt;if [ " $CONTROLDIR" = " " ] ; then&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if [ -f /var/indimail/control/outgoingip.$host ] ; then&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;IP=(`cat /var/indimail/control/outgoingip.$host`)&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;elif [ -f /var/indimail/control/outgoingip ] ; then&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;IP=(`cat /var/indimail/control/outgoingip`)&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;else&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;exec -a qmail-remote $PROG "$host" "$sender" "$qqeh" $size $*&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;fi&lt;/div&gt;&lt;div&gt;else&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if [ -f $CONTROLDIR/outgoingip.$host ] ; then&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;IP=(`cat $CONTROLDIR/outgoingip.$host`)&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;elif [ -f $CONTROLDIR/outgoingip ] ; then&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;IP=(`cat $CONTROLDIR/outgoingip`)&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;else&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;exec -a qmail-remote $PROG "$host" "$sender" "$qqeh" $size $*&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;fi&lt;/div&gt;&lt;div&gt;fi&lt;/div&gt;&lt;div&gt;IP_COUNT=${#IP[*]}&lt;/div&gt;&lt;div&gt;if [ $IP_COUNT -gt 1 ] ; then&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;i=`expr $RANDOM % $IP_COUNT`&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;export OUTGOINGIP=${IP[$i]}&lt;/div&gt;&lt;div&gt;fi&lt;/div&gt;&lt;div&gt;exec -a qmail-remote $PROG "$host" "$sender" "$qqeh" $size $*&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Indimail/~4/Zqqb-iNPsY8" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Indimail/~3/Zqqb-iNPsY8/distributing-your-outgoing-mails-from.html</link><author>noreply@blogger.com (Cprogrammer)</author><thr:total>0</thr:total><feedburner:origLink>http://indimail.blogspot.com/2011/01/distributing-your-outgoing-mails-from.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-269688189640615970.post-1502474128812385871</guid><pubDate>Mon, 02 Aug 2010 07:50:00 +0000</pubDate><atom:updated>2010-08-02T13:20:43.530+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">indimail qmail-send</category><title>Handling Bounces yourself</title><description>&lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt; allows a mechanism by which you can use your own script/program to handle bounces. All bounces in IndiMail is generated by &lt;b&gt;qmail-send.&lt;/b&gt; &lt;b&gt;qmail-send&lt;/b&gt; generates a bounce when &lt;b&gt;qmail-lspawn&lt;/b&gt; or &lt;b&gt;qmail-rspawn&lt;/b&gt; reports a permanent failed delivery. A bounce is generated by qmail-send by injecting a new mail in the queue using qmail-queue. This bounce generation by qmail-send can be modified in three ways&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1. Using environment variable BOUNCEPROCESSOR&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
When you define the environment variable BOUNCEPROCESSOR as a valid path to a program or script, the program gets called whenever a delivery fails permanently. The program runs with the uid &lt;b&gt;&lt;i&gt;qmails&lt;/i&gt;&lt;/b&gt; and is passed the following five arguments&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;bounce_file bounce_report bounce_sender original_recipient bounce_recipient&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
To set BOUNCEPROCESSOR, you would do the following&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;b&gt;# echo "path_of_your_bounce_processor" &amp;gt; /service/qmail-send.25/variables/BOUNCEPROCESSOR&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
There are few email marketing companies who are using BOUNCEPROCESSOR to insert the status of all bounces in MySQL table for their email marketing campaigns.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;2 Using environment variable BOUNCERULES or control files bounce.envrules&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
Using envrules, you can set specific environment variables only for bounced recipients. The format of &amp;nbsp;this &amp;nbsp;file &amp;nbsp;is &amp;nbsp;of &amp;nbsp;the &amp;nbsp;form&lt;br /&gt;
&lt;br /&gt;
pat:envar1=val,envar2=val,...]&lt;br /&gt;
&lt;br /&gt;
where pat is a regular expression which matches a bounce recipient. &amp;nbsp;envar1,&amp;nbsp;envar2 are list of environment variables to be set. If var is omitted, the environment variable is unset.&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;b&gt;support@indimail.org:CONTROLDIR=control2,QMAILQUEUE=/var/indimail/bin/qmail-nullqueue&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
causes all bounces generated for the sender support@indimail.org to be discarded.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;3. Using BOUNCEQUEUE environment variable to queue bounces&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
qmail-send &amp;nbsp;uses &amp;nbsp;qmail-queue to queue bounces and aliases/forwards. This can be changed by using QMAILQUEUE environment variable. If a different queue program is desired for bounces, it can be set by using BOUNCEQUEUE environment variable.&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;e.g&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;b&gt;# echo /var/indimail/bin/qmail-nullqueue &amp;gt; /service/qmail-send.25/variables/BOUNCEQUEUE&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;disables bounces system-wide. Though disabling bounces may not be the right thing to do but in some situations where bounces are not at all needed, disabling bounces will surely result in performance improvements of your system, especially so if your system does mass-mailing.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Indimail/~4/3-icNtZPDdk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Indimail/~3/3-icNtZPDdk/handling-bounces-yourself.html</link><author>noreply@blogger.com (Cprogrammer)</author><thr:total>0</thr:total><feedburner:origLink>http://indimail.blogspot.com/2010/08/handling-bounces-yourself.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-269688189640615970.post-8299059948159754577</guid><pubDate>Tue, 13 Jul 2010 07:35:00 +0000</pubDate><atom:updated>2010-07-13T18:46:07.133+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">vdelivermail LDA dot-qmail</category><title>Delivery Instructions for a Virtual Domain</title><description>&lt;b&gt;&lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt;&lt;/b&gt; uses a modified version of &lt;a href="http://cr.yp.to/qmail.html"&gt;qmail&lt;/a&gt; as the &lt;a href="http://en.wikipedia.org/wiki/Message_transfer_agent"&gt;MTA&lt;/a&gt;. For local deliveries, &lt;b&gt;qmail-lspawn&lt;/b&gt; reads a series of local delivery commands from descriptor 0, invokes &lt;b&gt;qmail-local&lt;/b&gt; to perform the deliveries. &lt;b&gt;qmail-local&lt;/b&gt; reads a mail message and delivers to to a user by the procedure described in &lt;b&gt;dot-qmail(5)&lt;/b&gt;. &lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt; uses &lt;b&gt;vdelivermail&lt;/b&gt; as the local delivery agent.&lt;br /&gt;
&lt;br /&gt;
A virtual domain is created by the command &lt;b&gt;vadddomain(1)&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;% vadddomain example.com some_password&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The above command creates a virtual domain with delivery instructions in &lt;i&gt;&lt;b&gt;/var/indimail/domains/example.com/.qmail-default&lt;/b&gt;&lt;/i&gt; file. A line in this file is of the form&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;b&gt;/var/indimail/sbin/vdelivermail '' delivery_instruction_for_non_existing_user&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The delivery_instruction_for_non_existing_user can have one of the following 5 forms&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;delete&lt;/li&gt;
&lt;li&gt;bounce-no-mailbox&lt;/li&gt;
&lt;li&gt;Maildir&lt;/li&gt;
&lt;li&gt;emailAddress&lt;/li&gt;
&lt;li&gt;IPaddress&lt;/li&gt;
&lt;/ol&gt;&lt;div&gt;Using &lt;b&gt;&lt;i&gt;delete&lt;/i&gt;&lt;/b&gt; as the delivery instruction causes IndiMail to discard all mails addressed to non-existing users. The original sender does not get notified of the delivery. On a real messaging system serving real users, you will not want to do this.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;The instruction &lt;b&gt;&lt;i&gt;bounce-no-mailbox&lt;/i&gt;&lt;/b&gt; causes a bounce to be generated to the sender in case an email is addressed to a non-existing user. This is the most common usage in &lt;b&gt;&lt;i&gt;.qmail-default&lt;/i&gt;&lt;/b&gt; which most IndiMail installations will have&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;The instruction &lt;b&gt;&lt;i&gt;Maildir&lt;/i&gt;&lt;/b&gt; causes emails to be addressed to non-existing users to be saved in a &lt;a href="http://en.wikipedia.org/wiki/Maildir"&gt;Maildir&lt;/a&gt;. Here &lt;b&gt;&lt;i&gt;Maildir&lt;/i&gt;&lt;/b&gt; should refer to a full path of an existing &lt;a href="http://en.wikipedia.org/wiki/Maildir"&gt;Maildir&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;The instruction &lt;b&gt;&lt;i&gt;emailAddress&lt;/i&gt;&lt;/b&gt; causes emails to be addressed to non-existing users to be forwarded to an email address &lt;b&gt;&lt;i&gt;emailAddress&lt;/i&gt;&lt;/b&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;The instruction &lt;b&gt;IPaddress&lt;/b&gt; causes emails to be addressed to non-existing users to be redirected to a remote SMTP server at IP &lt;b&gt;&lt;i&gt;IPaddress&lt;/i&gt;&lt;/b&gt;. The format of &lt;b&gt;&lt;i&gt;IPaddress&lt;/i&gt;&lt;/b&gt; is &lt;b&gt;&lt;i&gt;domain:ip:port&lt;/i&gt;&lt;/b&gt; where &lt;b&gt;&lt;i&gt;domain&lt;/i&gt;&lt;/b&gt; is the domain name, &lt;b&gt;&lt;i&gt;ip&lt;/i&gt;&lt;/b&gt; is the IP address of the remote SMTP server and &lt;b&gt;&lt;i&gt;port&lt;/i&gt;&lt;/b&gt; is the SMTP port on the remote SMTP server. It is expected that the non-existing user is present on the remote system. This type of delivery is used by &lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt; on a clustered setup. In a clustered setup, users are distributed across multiple server. A particular user will be located only on one particular server. However, the same domain will be present on multiple servers.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;In the delivery instruction in &lt;b&gt;&lt;i&gt;.qmail-default&lt;/i&gt;&lt;/b&gt;, you can replace &lt;b&gt;vdelivermail&lt;/b&gt; with &lt;b&gt;vfilter&lt;/b&gt; to perform in-line filtering use &lt;a href="http://www.indimail.org/"&gt;IndiMail's&lt;/a&gt; poweful &lt;b&gt;vfilter&lt;/b&gt;. You can create filters using the program &lt;b&gt;vcfilter&lt;/b&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Indimail/~4/anQxUuGjRL4" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Indimail/~3/anQxUuGjRL4/delivery-instructions-for-virtual.html</link><author>noreply@blogger.com (Cprogrammer)</author><thr:total>1</thr:total><feedburner:origLink>http://indimail.blogspot.com/2010/07/delivery-instructions-for-virtual.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-269688189640615970.post-2767718935014126128</guid><pubDate>Thu, 08 Jul 2010 04:06:00 +0000</pubDate><atom:updated>2010-07-09T20:41:13.421+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">relaying SMTP indimail</category><title>Relaying - How does IndiMail handle relaying securely</title><description>A &lt;a href="http://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol"&gt;SMTP&lt;/a&gt; server is responsible for accepting mails from a sender and processing it for delivery to&amp;nbsp;one or more recipients. In most situations, for domains which are under your administrative&amp;nbsp;control (native addresses), the SMTP server should accept mails without authentication. However, when a mail is&amp;nbsp;submitted for delivery to domains which are not under your administrative control, you should&amp;nbsp;accept mails only after it satisfies security considerations like having the sender authenticate&amp;nbsp;itself. This is to prevent abuse of external domains using your &lt;a href="http://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol"&gt;SMTP&lt;/a&gt; server. A &lt;a href="http://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol"&gt;SMTP&lt;/a&gt; server which&amp;nbsp;accepts mails for external domains without any authentication is called an &lt;a href="http://encyclopedia.thefreedictionary.com/SMTP+relay"&gt;open relay&lt;/a&gt;. The&amp;nbsp;act of accepting mails for external domains for delivery is called relaying.&lt;br /&gt;
&lt;br /&gt;
The default configuration of &lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt; configures the SMTP as a closed system. Hence to be&amp;nbsp;able to send mails to external domains, you need to setup mechanisms for relaying.&lt;br /&gt;
&lt;br /&gt;
There are many methods. Choose any of the below after studying them. I prefer 3 or 4 for&amp;nbsp;security reasons.&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Have Sender's IP addresses in tcp.smtp file&lt;/li&gt;
&lt;li&gt;Use control file relayclients for IP addresses of clients allowed to relay mail through this&amp;nbsp;host.&lt;/li&gt;
&lt;li&gt;Configure &lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt; to use MySQL relay table (good security). This is implemented on POP3/IMAP before SMTP&lt;/li&gt;
&lt;li&gt;Use authenticated SMTP (good security)&lt;/li&gt;
&lt;li&gt;For allowing relay to specific domains use control file relaydomains&lt;/li&gt;
&lt;li&gt;For allowing specific users (native addresses) use control file relaymailfrom&lt;/li&gt;
&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;NOTE: you should use 1 &amp;amp; 2 only if if the host having the sender's IP is under your control and&amp;nbsp;you have good security policies for the host (however what is a good security can&amp;nbsp;be very subjective)&lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;Using tcp.smtp&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Your startup script for the qmail smtp server must use the tcpserver -x file option similar to&amp;nbsp;this startup line.&lt;br /&gt;
&lt;br /&gt;
env - PATH="/var/indimail/bin" tcpserver -H -R -x /var/indimail/etc/tcp.smtp.cdb \&lt;br /&gt;
-c 20 -u 555 -g 555 0 smtp /var/indimail/bin/qmail-smtpd 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
IndiMail uses -x option to tcpserver and hence you need not bother about the above line. You however need to&amp;nbsp;edit /var/indimail/etc/tcp.smtp and put in lines for all static IP's that you will always&amp;nbsp;want to relay access to.&lt;br /&gt;
&lt;br /&gt;
127.0.0.:allow,RELAYCLIENT=””&lt;br /&gt;
10.1.1.:allow,RELAYCLIENT=””&lt;br /&gt;
&lt;br /&gt;
The above lines will cause &lt;b&gt;RELAYCLIENT&lt;/b&gt;&amp;nbsp;environment variable to be set for localhost and all machines on&amp;nbsp;the 10.1.1 class and hence allow to relay through. Remember that any user on hosts on 10.1.1&amp;nbsp;class will be able to relay mails. You many not want this. The line having 127.0.0. will allow any client on the &lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt; host to use SMTP and relay mails.&lt;br /&gt;
&lt;br /&gt;
If you add any IP to tcp.smtp, you have to rebuild a cdb database tcp.smtp.cdb. You can run the following command&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;% sudo /var/indimail/bin/qmailctl cdb&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;NOTE:&lt;/b&gt; Remember that you are exposed to&amp;nbsp;unrestricted&amp;nbsp;relaying from any of the IP addresses listed in tcp.smtp&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Using control file relayclients&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
IP addresses of clients allowed to relay mail &amp;nbsp;through &amp;nbsp;this &amp;nbsp;host. &amp;nbsp; Each&amp;nbsp;address should be followed by a colon and an (optional) string that should&amp;nbsp;be appended to each incoming recipient address, just as &amp;nbsp;with &amp;nbsp;the &amp;nbsp;&lt;b&gt;RELAYCLIENT&lt;/b&gt; environment variable. &amp;nbsp;Nearly always, the optional string should be&amp;nbsp;null. The filename can be overriden by &amp;nbsp;the &amp;nbsp;environment &amp;nbsp;variable &amp;nbsp;&lt;b&gt;RELAYCLIENTS&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
Addresses in relayclients may be wildcarded (2nd line in the example below):&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;192.168.0.1:&lt;br /&gt;
&amp;nbsp;192.168.1.:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Using MySQL relay table&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Run the command &lt;b&gt;&lt;i&gt;/var/indimail/bin/clearopensmtp&lt;/i&gt;&lt;/b&gt; in the cron every 30 Minutes&lt;br /&gt;
&lt;br /&gt;
By default&amp;nbsp;every time&amp;nbsp;who uses &lt;a href="http://www.indimail.org/"&gt;IndiMail's&lt;/a&gt; &amp;nbsp;POP3 or IMAP service and authenticates, the following happens:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;On successful authentication, IMAP/POP3 daemon inserts entry into relay table, inserting&amp;nbsp;email, IP address and timestamp.&lt;/li&gt;
&lt;li&gt;If &lt;b&gt;CHECKRELAY&lt;/b&gt; environment variable is enabled, SMTP checks the relay table for a entry&amp;nbsp;within minutes specified by the &lt;b&gt;RELAY_CLEAR_MINUTES&lt;/b&gt; environment variable. If the entry is&amp;nbsp;there, &lt;b&gt;RELAYCLIENT&lt;/b&gt; environment variable is set, which allows relaying.&amp;nbsp;At this point, the SMTP server will allow that IP to relay for 60 Mins (default)&lt;/li&gt;
&lt;/ol&gt;&lt;b&gt;clearopensmtp&lt;/b&gt; will clear all IP which have not authenticated in the past&amp;nbsp;&lt;b&gt;RELAY_CLEAR_MINUTES&lt;/b&gt;.&amp;nbsp;&lt;b&gt;clearopensmtp&lt;/b&gt; should be enabled in cron to run every 30 minutes.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Set up Authenticated SMTP&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt; also provides you authenticated SMTP providing &lt;b&gt;AUTH PLAIN&lt;/b&gt;, &lt;b&gt;AUTH LOGIN&lt;/b&gt; and &lt;b&gt;AUTH CRAM-MD5&lt;/b&gt; methods.&amp;nbsp;Whenever a user successfully authenticates through SMTP, the RELAYCLIENT environment&amp;nbsp;variable gets set. &lt;b&gt;&lt;i&gt;qmail-smtpd&lt;/i&gt;&lt;/b&gt; uses the &lt;b&gt;RELAYCLIENT&lt;/b&gt; environment&amp;nbsp;variable&amp;nbsp;to allow relaying.&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Most of the email clients like thunderbird, evolution, outlook, outlook express have options to use authenticated SMTP.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;For a tutorial on authenticated SMTP, you can refer to&lt;/div&gt;&lt;div&gt;&lt;a href="http://indimail.blogspot.com/2010/03/authenticated-smtp-tutorial.html"&gt;http://indimail.blogspot.com/2010/03/authenticated-smtp-tutorial.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;Using control file relaydomains&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;Host &amp;nbsp;and &amp;nbsp;domain &amp;nbsp;names &amp;nbsp;allowed &amp;nbsp;to &amp;nbsp;relay mail through this host. &amp;nbsp;Each &amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;address should be followed by a colon and an (optional) string that should&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;/div&gt;&lt;/b&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;be &amp;nbsp;appended &amp;nbsp;to &amp;nbsp;each incoming recipient address, just as with the RELAY\&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;/div&gt;&lt;/b&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;CLIENT environment variable. &amp;nbsp;Nearly always, the optional string should be&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;/div&gt;&lt;/b&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;null.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;/div&gt;&lt;/b&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;Addresses in relaydomains may be wildcarded:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;/div&gt;&lt;/b&gt;&lt;/div&gt;&lt;/b&gt;&lt;/div&gt;&lt;/b&gt;&lt;/div&gt;&lt;/b&gt;&lt;/div&gt;&lt;/b&gt;&lt;/div&gt;&lt;/b&gt;&lt;/div&gt;&lt;/b&gt;&lt;/div&gt;&lt;/b&gt;&lt;/div&gt;&lt;/b&gt;&lt;/div&gt;&lt;/b&gt;&lt;/div&gt;&lt;/b&gt;&lt;/div&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="display: inline !important;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp;heaven.af.mil:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;/span&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;div style="display: inline !important;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp;.heaven.af.mil:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Using control file relaymailfrom&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;envelope &amp;nbsp;senders (MAIL FROM) listed in this file will be allowed to relay independently of the RELAYCLIENT environment variable. Entries in relaymailfrom can be E-Mail addresses, or just the domain (with the @ sign).&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
Unlike relaydomains native addresses should be entered. &amp;nbsp;A line in &amp;nbsp;relay&amp;nbsp;mailfrom &amp;nbsp;may be of the form @host, meaning every address at host. &amp;nbsp;relaymailfrom can also be in cdb format. If relaymailfrom.cdb &amp;nbsp;is &amp;nbsp;present, &amp;nbsp;it&amp;nbsp;will be searched first.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;nbsp; joeblow@domain1.com&lt;br /&gt;
&amp;nbsp; @domain2.com&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;If you use the control file /var/indimail/control/relaymailfrom, you should really know what you are doing. Any mail from having a domain component of the address matching any domain in this file, relaying will be allowed without any authentication. You can most probably use this only if you have a closed SMTP server to which access from outside is not possible.&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Indimail/~4/aIATXcapv_4" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Indimail/~3/aIATXcapv_4/relaying-how-does-indimail-handle.html</link><author>noreply@blogger.com (Cprogrammer)</author><thr:total>0</thr:total><feedburner:origLink>http://indimail.blogspot.com/2010/07/relaying-how-does-indimail-handle.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-269688189640615970.post-7813777339801988030</guid><pubDate>Fri, 02 Jul 2010 12:42:00 +0000</pubDate><atom:updated>2010-07-02T18:12:32.538+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">envrules qmail-smtpd spawn-filter indimail qmail</category><title>Introducing envrules for local and remote deliveries</title><description>&lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt; allows you to configure most of its functionality through set of environment variables. In fact there more more than 200 features that can be controlled just by setting or un-setting environment variables. I briefly spoke about envrules for SMTP (&lt;b&gt;qmail-smtpd&lt;/b&gt;) in my earlier &lt;a href="http://indimail.blogspot.com/2010/04/introducing-envrules-for-smtp.html"&gt;post&lt;/a&gt;. envrules is applicable to &lt;b&gt;qmail-inject&lt;/b&gt;, &lt;b&gt;qmail-local&lt;/b&gt;, &lt;b&gt;qmail-remote&lt;/b&gt; as well.&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Some of these environment variables can be set during the startup of various services. &lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt; has all its services configured as directories in the &lt;i&gt;&lt;b&gt;/service&lt;/b&gt;&lt;/i&gt; directory. As an example, if you want to force authenticated SMTP on all your users, setting the environment variable &lt;b&gt;REQUIREAUTH&lt;/b&gt; allows you to do so.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;% su&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;# echo 1 &amp;gt; /service/qmail-smtpd.587/variables/REQUIREAUTH&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;sets the &lt;b&gt;qmail-smtpd&lt;/b&gt; running on port 587 to force authentication.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Setting environment variables in your startup script, in your .profile or your shell forces you to permanently set the environment variable to a specific value. Using &lt;b&gt;envrules&lt;/b&gt;, &lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt; allows you to set these environment variables specific to different senders or recipients. envrules allows &lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt; platform to be tuned differently for different users. No other messaging platform, to the best of my knowledge, is capable of doing that. Another way of saying is that envrules allows your IndiMail platform to dynamically change its behavior for each and every user.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;For the SMTP service, you can set different environment variables for different senders. All that is required is to define the following in the control file &lt;i&gt;/var/indimail/control/from.envrules&lt;/i&gt;. The format of this file is of the form&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt; pattern:envar1=val,envar2=val,...]&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;where pattern is a regular expression which matches a sender. envar1, envar2 are list of environment variables to be set. If val is omitted, the environment  variable is unset.The  name of the control file can be overriden by the environment variable &lt;b&gt;FROMRULES&lt;/b&gt;. e.g. having the following in from.envrules&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt; *consultant:REQUIREAUTH=1,NORELAY=1&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;forces all users whose email ids end with '&lt;i&gt;consultant&lt;/i&gt;' to authenticate while sending mails. Also such users will be prevented from sending mails to outside your domain.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt; ceo@example.com:DATASIZE=&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Removes all message size restrictions for the user whose email address is ceo@example.com&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;You can also set envrules on per recipient basis. This gets set for &lt;b&gt;qmail-local&lt;/b&gt; &amp;amp; &lt;b&gt;qmail-remote&lt;/b&gt;. The control file to be used in this case is &lt;i&gt;/var/indimail/control/rcpt.envrules&lt;/i&gt;. The filename can be overridden by &lt;b&gt;RCPTRULES&lt;/b&gt; environment variable.&lt;/div&gt;&lt;div&gt;.e.g&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;  *.yahoo.com:OUTGOINGIP=192.168.2.100&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;The OUTGOINGIP environment variable is used by qmail-remote to bind on a specific IP address when connecting to the remote SMTP server. The above envrule forces qmail-remote to use 192.168.2.100 as the outgoing IP address when sending mails to any recipient at yahoo.com.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;For SMTP service the following the following list of environment variables can be modified using envrules&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;REQUIREAUTH,  QREGEX, ENFORCE_FQDN_HELO, DATABYTES, BADHELOCHECK, BADHELO,&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; BADHOST, BADHOSTCHECK, TCPPARANOID, NODNSCHECK, VIRUSCHECK,  VIRUSFORWARD,&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; REMOVEHEADERS, ENVHEADERS, LOGHEADERS, LOGHEADERFD, SIGNATURES, BODYCHECK,&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; BADMAILFROM, BADMAILFROMPATTERNS, BOUNCEMAIL, CUGMAIL,  MASQUERADE,  BADR&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;CPTTO,  BADRCPTPATTERNS, GOODRCPTTO, GOODRCPTPATTERNS, GREYIP, GREETDELAY,&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; CLIENTCA, TLSCIPHERS,  SERVERCERT, BLACKHOLERCPT,  BLACKHOLERCPTPATTERNS,&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; SIGNKEY,  SIGNKEYSTALE, SPFBEHAVIOR,  TMPDIR,  TARPITCOUNT,  TARPITDELAY, &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; MAXRECIPIENTS, MAX_RCPT_ERRCOUNT, AUTH_ALL, CHECKRELAY, CONTROLDIR,  ANTI&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;SPOOFING, CHECKRECIPIENT, SPAMFILTER, LOGFILTER, SPAMFILTERARGS, SPAMEXIT&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;CODE, REJECTSPAM, SPAMREDIRECT,  SPAMIGNORE,  SPAMIGNOREPATTERNS,  FILTER&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;ARGS,  QUEUEDIR,  QUEUE_BASE, QUEUE_START, QUEUE_COUNT, QMAILQUEUE, QUEUE&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;PROG, RELAYCLIENT, QQEH, BADEXT, BADEXTPATTERNS,  ACCESSLIST,  EXTRAQUEUE,&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; QUARANTINE,   QHPSI,   QHPSIMINSIZE,   QHPSIMAXSIZE,   QHPSIRC,   QHPSIRN,&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; USE_FSYNC, SCANCMD, PLUGINDIR, QUEUE_PLUGIN, PASSWORD_HASH,  MAKESEEKABLE,&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; MIN_FREE,  ERROR_FD,  DKSIGN, DKVERIFY, DKSIGNOPTIONS, DKQUEUE, DKEXCLUDE&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;HEADERS, DKIMSIGN,  DKIMVERIFY,  DKIMPRACTICE,  DKIMIDENTITY,  DKIMEXPIRE,&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; SIGN_PRACTICE DKIMQUEUE, SIGNATUREDOMAINS, and NOSIGNATUREDOMAINS&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div&gt;The following list of environment variables can be modified using envrules if &lt;b&gt;QMAILLOCAL&lt;/b&gt; and &lt;b&gt;QMAILREMOTE&lt;/b&gt; is set to &lt;i&gt;/var/indimail/bin/spawn-filter&lt;/i&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;QREGEX, SPAMFILTER, LOGFILTER, SPAMFILTERARGS, FILTERARGS,  SPAMEXITCODE, HAMEXITCODE,  UNSUREEXITCODE, REJECTSPAM, SPAMREDIRECT,   SPAMIGNORE, SPAMIGNOREPATTERNS,  DATABYTES,  MDA, MYSQL_INIT_COMMAND, MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP, MYSQL_OPT_CONNECT_TIMEOUT,    MYSQL_OPT_READ_TIMEOUT,     MYSQL_OPT_WRITE_TIMEOUT, QUEUEDIR, QUEUE_BASE, QUEUE_START, QUEUE_COUNT, and TMPDIR&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;The  following  list  of environment variables which can be modified using envrules are specfic to &lt;b&gt;qmail-remote&lt;/b&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;CONTROLDIR, SMTPROUTE, SIGNKEY, OUTGOINGIP, DOMAINBINDINGS,  AUTH_SMTP, MIN_PENALTY, and MAX_TOLERANCE&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;The  following  list  of environment variables which can be modified using envrules are specfic to &lt;b&gt;qmail-local&lt;/b&gt;. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;USE_SYNCDIR, USE_FSYNC, and LOCALDOMAINS&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"&gt;Do man &lt;span style="font-weight: bold;"&gt;qmail-smtpd(8), spawn-filter(8)&lt;/span&gt; to know the full list of environment variables that can be controlled using &lt;span style="font-weight: bold;"&gt;envrules&lt;/span&gt;.&lt;/span&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Indimail/~4/b-US4VdGzUE" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Indimail/~3/b-US4VdGzUE/introducing-envrules-for-local-and.html</link><author>noreply@blogger.com (Cprogrammer)</author><thr:total>0</thr:total><feedburner:origLink>http://indimail.blogspot.com/2010/07/introducing-envrules-for-local-and.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-269688189640615970.post-8805631240797690928</guid><pubDate>Wed, 30 Jun 2010 15:11:00 +0000</pubDate><atom:updated>2010-07-01T18:08:49.775+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">SOX HIPAA "email archiving" indimail altermime filterargs "Basel II" MiFID PIPEDA FRCP</category><title>Setting Disclaimers on your outgoing mails</title><description>&lt;div&gt;In my &lt;a href="http://indimail.blogspot.com/2010/06/email-archiving.html"&gt;earlier article&lt;/a&gt;, I showed how to set up automatic rule based archival. I had discussed email archival as one of the many compliance requirements you might have. Sometimes you may also require to configure disclaimers in your messaging system. e.g for &lt;a href="http://en.wikipedia.org/wiki/Companies_Act_2006"&gt;UK Companies Act 2006&lt;/a&gt;, &lt;a href="http://docs.google.com/viewer?a=v&amp;amp;q=cache:WP7RfI-O-LUJ:www.irs.gov/pub/irs-utl/circular_230.pdf+IRS+Circular+230&amp;amp;hl=en&amp;amp;gl=in&amp;amp;pid=bl&amp;amp;srcid=ADGEESjp9HV7lRi8ri9_axQvWhLbclCDjOlbMVcV9P8dewabWMQrRQl_0fO8nf-0heSQC-OLej4S9iJF9t37CenIZizmlV2ClSvUrBHSVc33e6xrNpkxU73s4RI1lWw3pc8BH4ZqZxYx&amp;amp;sig=AHIEtbRu1KKeuckajLXwpf6hurkT1zG91g"&gt;IRS Circular 230&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt; provides a utility called &lt;a href="http://www.pldaniels.com/altermime/"&gt;altermime(1)&lt;/a&gt; to add your own disclaimers on each and every mail that goes out through your &lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt; messaging server. You can use any of the two options below to configure disclaimers&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Option 1 - using /var/indimail/control/filterargs&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The &lt;i&gt;filterargs&lt;/i&gt; control file allows you to insert any filter before remote or local delivery. You can use altermime to insert a disclaimer as below&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;*:/var/indimail/bin/altermime --input=- \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;     --disclaimer=/var/indimail/control/disclaimer&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;If you want disclaimer to be used only for your outgoing mails then, you could do the following&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;*:remote:/var/indimail/bin/altermime --input=- \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;    --disclaimer=/var/indimail/control/disclaimer&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;In both the above examples the file /var/indimail/control/disclaimer contains the text of your disclaimer&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Option 2 - Set the FILTERARGS environment variabl&lt;/b&gt;e&lt;/div&gt;&lt;div&gt;Just like &lt;i&gt;filterargs&lt;/i&gt; control file, the environment variable &lt;b&gt;FILTERARGS&lt;/b&gt; allows you to set any custom filter before your mail gets deposited into the queue by &lt;b&gt;qmail-queue(8)&lt;/b&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;% su &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;# echo /var/indimail/bin/altermime --input=- --disclaimer=/var/indimail/control/disclaimer \&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;   &gt; /service/qmail-smtpd.587/variables/FILTERARGS&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;# svc -d /service/qmail-smtpd.587&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;# svc -u /service/qmail-smtpd.587&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Read &lt;b&gt;altermime(1)&lt;/b&gt; man page for more details&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;You can download IndiMail at&lt;br /&gt;&lt;a href="http://sourceforge.net/projects/indimail/"&gt;http://sourceforge.net/projects/indimail/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The  RPM can be downloaded from&lt;br /&gt;&lt;a href="http://download.opensuse.org/repositories/home:/indimail/"&gt;http://download.opensuse.org/repositories/home:/indimail/&lt;/a&gt;&lt;br /&gt;&lt;table style="background-color: rgb(255, 255, 255); padding: 5px;" border="0" cellspacing="0"&gt;&lt;tbody&gt; &lt;/tbody&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;img src="http://groups.google.com/intl/en/images/logos/groups_logo_sm.gif" /&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td style="padding-left: 5px;"&gt;&lt;b&gt;Subscribe to indimail&lt;/b&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt; &lt;form action="http://groups.google.com/group/indimail/boxsubscribe"&gt;&lt;/form&gt; &lt;tr&gt;&lt;td style="padding-left: 5px;"&gt;&lt;br /&gt;Email: &lt;input name="email" type="text"&gt;&lt;br /&gt;&lt;input name="sub" value="Subscribe" type="submit"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="right"&gt;&lt;a href="http://groups.google.com/group/indimail"&gt;Visit this group&lt;/a&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;img src="http://feeds.feedburner.com/~r/Indimail/~4/-HHuzGTlnRA" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Indimail/~3/-HHuzGTlnRA/setting-disclaimers-on-your-outgoing.html</link><author>noreply@blogger.com (Cprogrammer)</author><thr:total>0</thr:total><feedburner:origLink>http://indimail.blogspot.com/2010/06/setting-disclaimers-on-your-outgoing.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-269688189640615970.post-9125063277377166168</guid><pubDate>Sat, 26 Jun 2010 03:49:00 +0000</pubDate><atom:updated>2011-08-02T14:07:01.380+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">SOX HIPAA "email archiving" indimail qmail-queue "Basel II" MiFID PIPEDA FRCP</category><title>Email Archiving</title><description>&lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt; provides multiple options for those who want their emails archived automatically. &lt;br /&gt;
&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;For easy retrieval, you can use tools like google desktop, beagle, etc&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;If you use IndiMail, you have two methods to achieve automatic archiving of emails&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;1. using environment variable EXTRAQUEUE&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;If EXTRAQUEUE environment variable is set to any environment variable, qmail-queue will deposit an extra copy of the email which it receives for putting it in the queue. Normally you would set EXTRAQUEUE variable in any of the clients which use qmail-queue. e.g. qmail-smtpd, qmail-inject, sendmail, etc. If you have setup IndiMail as per the official instructions, you can set EXTRAQUEUE for incoming and outgoing mails as given below&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;% su&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;# echo "archive@example.com" &amp;gt; /service/qmail-smtpd.25/variables/EXTRAQUEUE&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;# echo "archive@example.com" &amp;gt; /service/qmail-smtpd.587/variables/EXTRAQUEUE&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;# svc -d /service/qmail-smtpd.25 /service/qmail-smtpd.587&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;# svc -u /service/qmail-smtpd.25 /service/qmail-smtpd.587&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;# exit&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Now all your emails coming in and going out of the system, a copy will be sent to archive@example.com. If archive@example.com lies on IndiMail Messaging Platform, you can set filters (&lt;b&gt;using vfilter(1)&lt;/b&gt;) to automatically deposit the mails in different folders. The folders can be decided on various criteria like date, sender, recipient, domain, etc.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;2. using control file mailarchive&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;This control file allows you to set up rule based archiving. For any specific sender or recipient, you can set a rule to select a destination email for archiving. This is much more flexible than using EXTRAQUEUE which allowed you to archive emails to a single email address. A line in the control file mailarchive can be of the form&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;type:regexp:dest_address&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Here type is 'T' to set a rule on recipients. You can set the type as 'F' to set a rule on the sender.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;regexp is any email address which matches the sender or recipient (depending on whether type is 'T' or 'F').&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;dest_address should expand to a valid email address. You can have a valid email address. You can also have the '%' sign followed by the letters u, d or e in the address to have the following substitutions made&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;%u - gets replaced by the user component of email address (without the '@' sign)&lt;/div&gt;&lt;div&gt;%d - gets replaced by the domain component of email address&lt;/div&gt;&lt;div&gt;%e - gets replaced by the email address&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;The email address in the above substitution will be the recipient (if type is 'T') and the sender (if type is 'F').&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;another example and a cool tip :)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;T:*:%u@arch%d&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Will make a hot standby of your incoming mails for yourdomain on another server hosting &lt;b&gt;arch&lt;/b&gt;yourdomain.&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;NOTE: Currently only type = 'F' is implemented. type='T' will be implemented in release 1.7.8&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;For some organizations, email archiving is a must due to compliance with regulatory standards like &lt;a href="http://en.wikipedia.org/wiki/Sarbanes%E2%80%93Oxley_Act"&gt;SOX&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Health_Insurance_Portability_and_Accountability_Act"&gt;HIPAA&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Basel_II"&gt;Basel II Accord&lt;/a&gt; (effective 2006), &lt;a href="http://en.wikipedia.org/wiki/Privacy_Act_(Canada)"&gt;Canadian Privacy Ac&lt;/a&gt;t, &lt;a href="http://en.wikipedia.org/wiki/Data_Protection_Act_1998"&gt;Data Protection Act 1988&lt;/a&gt;,  &lt;a href="http://docs.google.com/viewer?a=v&amp;amp;q=cache:cS5HBLk1PU8J:download.pgp.com/pdfs/regulations/EUD_compliance_brief-080618.pdf+EU+Data+Protection+Directive+95/46/FC&amp;amp;hl=en&amp;amp;gl=in&amp;amp;pid=bl&amp;amp;srcid=ADGEESiZ-t43XtRj7zbqAg1o49q0czKBgayHgriM49Tt_Y9eIdEsaCq_52xTPAmO4Jv5M2qudymuWl8kZIyQjgsKhhrCNrZiWy7g2LMJNdydwyqFA_c9g73WqvvCUZD35tzr3e4MZoqG&amp;amp;sig=AHIEtbQUryWtZRLahL7iZY7hF-aYmBXfzQ"&gt;EU Data Protection Directive 95/46/FC&lt;/a&gt;, &lt;a href="http://csrc.nist.gov/groups/SMA/fisma/index.html"&gt;Federal Information Security Management Act (FISMA)&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Federal_Rules_of_Civil_Procedure"&gt;Federal Rules of Civil Procedure (FRCP&lt;/a&gt;), &lt;a href="http://en.wikipedia.org/wiki/Financial_Services_Act_1986"&gt;Financial Services Act 198, regulated by FSA&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Freedom_of_Information_Act_(United_States)"&gt;Freedom of Information Act (FOIA)&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Freedom_of_Information_Act_2000"&gt;Freedom of Information Act (in force January 2005)&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Gramm%E2%80%93Leach%E2%80%93Bliley_Act"&gt;The Gramm-Leach-Bliley Act (GLBA)&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Markets_in_Financial_Instruments_Directive"&gt;MiFID (Markets in Financial Instruments Directives)&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Personal_Information_Protection_and_Electronic_Documents_Act"&gt;PIPEDA (Personal Information Protection and Electronic Documents Act)&lt;/a&gt;, &lt;a href="http://whitepapers.techrepublic.com.com/abstract.aspx?docid=356636"&gt;SEC Rule 17a-4/ NASD 3010 (Securities Exchange Act 1934)&lt;/a&gt;.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;Apart from archiving, you would also want to set disclaimers. IndiMail allows you to set a disclaimer by setting the FILTERARGS environment variable and using &lt;b&gt;altermime(1)&lt;/b&gt;. The following acts/circular specifically require you to set disclaimers.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;a href="http://en.wikipedia.org/wiki/Companies_Act_2006"&gt;UK Companies Act 2006&lt;/a&gt;,  &lt;a href="http://docs.google.com/viewer?a=v&amp;amp;q=cache:WP7RfI-O-LUJ:www.irs.gov/pub/irs-utl/circular_230.pdf+IRS+Circular+230&amp;amp;hl=en&amp;amp;gl=in&amp;amp;pid=bl&amp;amp;srcid=ADGEESjp9HV7lRi8ri9_axQvWhLbclCDjOlbMVcV9P8dewabWMQrRQl_0fO8nf-0heSQC-OLej4S9iJF9t37CenIZizmlV2ClSvUrBHSVc33e6xrNpkxU73s4RI1lWw3pc8BH4ZqZxYx&amp;amp;sig=AHIEtbRu1KKeuckajLXwpf6hurkT1zG91g"&gt;IRS Circular 230&lt;/a&gt;, &lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;b&gt;Reference&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;div style="display: inline !important;"&gt;&lt;a href="http://www.itsecurity.com/features/feature-email-security-non-technical-101606/"&gt;Email Compliance - A simple 5 step guide&lt;/a&gt;&lt;/div&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;
&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;a href="http://en.wikipedia.org/wiki/E-mail_archiving"&gt;E-Mail archiving - Wikipedia&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blog.sonian.com/bid/30431/Compliance-Requirements-for-Email-Archiving"&gt;Compliance Requirements for email archiving&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://webcache.googleusercontent.com/search?q=cache:13mauWySqM4J:www.exclaimer.com/Libraries/Mail_Utilities_-_Documents/Summary_of_UK_European_and_US_Legislation.sflb.ashx+mail+archival+eu+compliance+laws&amp;amp;hl=en&amp;amp;gl=in"&gt;Email Legislation - Summary of UK, US, EU legislations&lt;/a&gt;&lt;/li&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
You can download IndiMail at&lt;br /&gt;
&lt;a href="http://sourceforge.net/projects/indimail/"&gt;http://sourceforge.net/projects/indimail/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The  RPM can be downloaded from&lt;br /&gt;
&lt;a href="http://download.opensuse.org/repositories/home:/indimail/"&gt;http://download.opensuse.org/repositories/home:/indimail/&lt;/a&gt;&lt;br /&gt;
&lt;table border="0" cellspacing="0" style="background-color: white; padding: 5px;"&gt;&lt;tbody&gt; &lt;/tbody&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;img src="http://groups.google.com/intl/en/images/logos/groups_logo_sm.gif" /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="padding-left: 5px;"&gt;&lt;br /&gt;
&lt;b&gt;Subscribe to indimail&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;form action="http://groups.google.com/group/indimail/boxsubscribe"&gt;&lt;/form&gt;&lt;tr&gt;&lt;td style="padding-left: 5px;"&gt;&lt;br /&gt;
Email: &lt;input name="email" type="text" /&gt;&lt;br /&gt;
&lt;input name="sub" type="submit" value="Subscribe" /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align="right"&gt;&lt;br /&gt;
&lt;a href="http://groups.google.com/group/indimail"&gt;Visit this group&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;img src="http://feeds.feedburner.com/~r/Indimail/~4/9QsFYU6YoMM" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Indimail/~3/9QsFYU6YoMM/email-archiving.html</link><author>noreply@blogger.com (Cprogrammer)</author><thr:total>0</thr:total><feedburner:origLink>http://indimail.blogspot.com/2010/06/email-archiving.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-269688189640615970.post-5826914392501669149</guid><pubDate>Thu, 10 Jun 2010 04:49:00 +0000</pubDate><atom:updated>2010-08-14T19:13:26.238+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">domain limits vlimit</category><title>Setting Limits for your Virtual Domain</title><description>IndiMail comes with a program &lt;span style="font-weight: bold;"&gt;vlimit(1)&lt;/span&gt;, which allows you to set global limits for your domain. Before using vlimit, you need to enable domain limits for a domain using &lt;b&gt;vmoddomain(1)&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;% vmoddomain -l 1 example.com&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Once you have done the above, you can start using vlimit for the domain example.com&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: 85%;"&gt;% vlimit -s example.com&lt;br /&gt;
Domain Expiry Date   : Never Expires&lt;br /&gt;
Password Expiry Date : Never Expires&lt;br /&gt;
Max Domain Quota     : -1&lt;br /&gt;
Max Domain Messages  : -1&lt;br /&gt;
Default User Quota   : -1&lt;br /&gt;
Default User Messages: -1&lt;br /&gt;
Max Pop Accounts     : -1&lt;br /&gt;
Max Aliases          : -1&lt;br /&gt;
Max Forwards         : -1&lt;br /&gt;
Max Autoresponders   : -1&lt;br /&gt;
Max Mailinglists     : -1&lt;br /&gt;
GID Flags:&lt;br /&gt;
Flags for non postmaster accounts:&lt;br /&gt;
pop account           : ALLOW_CREATE ALLOW_MODIFY ALLOW_DELETE&lt;br /&gt;
alias                 : ALLOW_CREATE ALLOW_MODIFY ALLOW_DELETE&lt;br /&gt;
forward               : ALLOW_CREATE ALLOW_MODIFY ALLOW_DELETE&lt;br /&gt;
autoresponder         : ALLOW_CREATE ALLOW_MODIFY ALLOW_DELETE&lt;br /&gt;
mailinglist           : ALLOW_CREATE ALLOW_MODIFY ALLOW_DELETE&lt;br /&gt;
mailinglist users     : ALLOW_CREATE ALLOW_MODIFY ALLOW_DELETE&lt;br /&gt;
mailinglist moderators: ALLOW_CREATE ALLOW_MODIFY ALLOW_DELETE&lt;br /&gt;
domain quota          : ALLOW_CREATE ALLOW_MODIFY ALLOW_DELETE&lt;br /&gt;
default quota         : ALLOW_CREATE ALLOW_MODIFY&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
Using vlimit you can set various limits or defaults for a domain. One of my favourite use of vlimit is setting default quota for users created in a domain. The default quota compiled in IndiMail is 5Mb which is not good enough for today's users. So if you want to have a default quota of 50 Mb for your users when you add them using the &lt;span style="font-weight: bold;"&gt;vadduser(1)&lt;/span&gt; command -&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: 85%;"&gt;% vlimit -q 52428800 example.com&lt;br /&gt;
% vlimit -s example.com&lt;br /&gt;
Domain Expiry Date   : Never Expires&lt;br /&gt;
Password Expiry Date : Never Expires&lt;br /&gt;
Max Domain Quota     : -1&lt;br /&gt;
Max Domain Messages  : -1&lt;br /&gt;
Default User Quota   : 52428800&lt;br /&gt;
Default User Messages: -1&lt;br /&gt;
Max Pop Accounts     : -1&lt;br /&gt;
Max Aliases          : -1&lt;br /&gt;
Max Forwards         : -1&lt;br /&gt;
Max Autoresponders   : -1&lt;br /&gt;
Max Mailinglists     : -1&lt;br /&gt;
GID Flags:&lt;br /&gt;
Flags for non postmaster accounts:&lt;br /&gt;
pop account           : ALLOW_CREATE ALLOW_MODIFY ALLOW_DELETE&lt;br /&gt;
alias                 : ALLOW_CREATE ALLOW_MODIFY ALLOW_DELETE&lt;br /&gt;
forward               : ALLOW_CREATE ALLOW_MODIFY ALLOW_DELETE&lt;br /&gt;
autoresponder         : ALLOW_CREATE ALLOW_MODIFY ALLOW_DELETE&lt;br /&gt;
mailinglist           : ALLOW_CREATE ALLOW_MODIFY ALLOW_DELETE&lt;br /&gt;
mailinglist users     : ALLOW_CREATE ALLOW_MODIFY ALLOW_DELETE&lt;br /&gt;
mailinglist moderators: ALLOW_CREATE ALLOW_MODIFY ALLOW_DELETE&lt;br /&gt;
domain quota          : ALLOW_CREATE ALLOW_MODIFY ALLOW_DELETE&lt;br /&gt;
default quota         : ALLOW_CREATE ALLOW_MODIFY &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You can also implement domain level restrictions. To disable POP3 for all users in example.com&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: 85%;"&gt;% vlimit -g p example.com&lt;br /&gt;
% vlimit -s example.com&lt;br /&gt;
Domain Expiry Date   : Never Expires&lt;br /&gt;
Password Expiry Date : Never Expires&lt;br /&gt;
Max Domain Quota     : -1&lt;br /&gt;
Max Domain Messages  : -1&lt;br /&gt;
Default User Quota   : 52428800&lt;br /&gt;
Default User Messages: -1&lt;br /&gt;
Max Pop Accounts     : -1&lt;br /&gt;
Max Aliases          : -1&lt;br /&gt;
Max Forwards         : -1&lt;br /&gt;
Max Autoresponders   : -1&lt;br /&gt;
Max Mailinglists     : -1&lt;br /&gt;
GID Flags:&lt;br /&gt;
NO_POP&lt;br /&gt;
Flags for non postmaster accounts:&lt;br /&gt;
pop account       : ALLOW_CREATE ALLOW_MODIFY ALLOW_DELETE&lt;br /&gt;
alias                    : ALLOW_CREATE ALLOW_MODIFY ALLOW_DELETE&lt;br /&gt;
forward               : ALLOW_CREATE ALLOW_MODIFY ALLOW_DELETE&lt;br /&gt;
autoresponder    : ALLOW_CREATE ALLOW_MODIFY ALLOW_DELETE&lt;br /&gt;
mailinglist           : ALLOW_CREATE ALLOW_MODIFY ALLOW_DELETE&lt;br /&gt;
mailinglist users     : ALLOW_CREATE ALLOW_MODIFY ALLOW_DELETE&lt;br /&gt;
mailinglist moderators: ALLOW_CREATE ALLOW_MODIFY ALLOW_DELETE&lt;br /&gt;
domain quota          : ALLOW_CREATE ALLOW_MODIFY ALLOW_DELETE&lt;br /&gt;
default quota         : ALLOW_CREATE ALLOW_MODIFY&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: 85%;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
You can download IndiMail at&lt;br /&gt;
&lt;a href="http://sourceforge.net/projects/indimail/"&gt;http://sourceforge.net/projects/indimail/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The  RPM can be downloaded from&lt;br /&gt;
&lt;a href="http://download.opensuse.org/repositories/home:/indimail/"&gt;http://download.opensuse.org/repositories/home:/indimail/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table border="0" cellspacing="0" style="background-color: white; padding: 5px;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;img src="http://groups.google.com/intl/en/images/logos/groups_logo_sm.gif" /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="padding-left: 5px;"&gt;&lt;br /&gt;
&lt;b&gt;Subscribe to indimail&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;form action="http://groups.google.com/group/indimail/boxsubscribe"&gt;&lt;/form&gt;&lt;tr&gt;&lt;td style="padding-left: 5px;"&gt;&lt;br /&gt;
Email: &lt;input name="email" type="text" /&gt;&lt;br /&gt;
&lt;input name="sub" type="submit" value="Subscribe" /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align="right"&gt;&lt;br /&gt;
&lt;a href="http://groups.google.com/group/indimail"&gt;Visit this group&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;img src="http://feeds.feedburner.com/~r/Indimail/~4/b5nqTZrQpWA" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Indimail/~3/b5nqTZrQpWA/setting-limits-for-your-virtual-domain.html</link><author>noreply@blogger.com (Cprogrammer)</author><thr:total>2</thr:total><feedburner:origLink>http://indimail.blogspot.com/2010/06/setting-limits-for-your-virtual-domain.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-269688189640615970.post-8840338230461972459</guid><pubDate>Tue, 01 Jun 2010 04:04:00 +0000</pubDate><atom:updated>2010-06-01T16:00:05.678+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">ldap indimail addressbook openldap</category><title>using openLDAP for addressbook</title><description>By now I have got exhausted answering folks 'Why IndiMail does not have a shared addressbook'&lt;br /&gt;&lt;br /&gt;IndiMail is a pure messaging platform. It does not attempt to do things which can be done better by other software like openLDAP etc.&lt;br /&gt;&lt;br /&gt;However, things can get bit tricky setting up an address book using openLDAP. This tutorial should make it easy for you to install your own shared address book. The commands below have worked for me on my linux laptop which is proudly powered by Fedora 12. The commands / configuration may slightly vary for your Linux distro / openLDAP version.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Install openldap&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;% sudo yum install openldap openldap-servers openldap-clients&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Configure openldap&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You need to start slapd to implement openldap. slapd uses configurion&lt;br /&gt;file /etc/openldap/slapd.conf&lt;br /&gt;&lt;br /&gt;The following slapd.conf file contains the basic configurations required to establish a shared address book on a secure network, however there are no access controls yet defined; security is covered later on. The encrypted root password (rootpw) should be substituted where necessary. You can use slappasswd to generate the password&lt;br /&gt;&lt;br /&gt;% slappasswd -s secret&lt;br /&gt;{SSHA}gDPX3cS87+B31mAF5zHCGtEJBYSuqrN/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;#&lt;br /&gt;# See slapd.conf(5) for details on configuration options.&lt;br /&gt;# This file should NOT be world readable.&lt;br /&gt;#&lt;br /&gt;include     /etc/openldap/schema/corba.schema&lt;br /&gt;include     /etc/openldap/schema/core.schema&lt;br /&gt;include     /etc/openldap/schema/cosine.schema&lt;br /&gt;include     /etc/openldap/schema/duaconf.schema&lt;br /&gt;include     /etc/openldap/schema/dyngroup.schema&lt;br /&gt;include     /etc/openldap/schema/inetorgperson.schema&lt;br /&gt;include     /etc/openldap/schema/java.schema&lt;br /&gt;include     /etc/openldap/schema/misc.schema&lt;br /&gt;include     /etc/openldap/schema/nis.schema&lt;br /&gt;include     /etc/openldap/schema/openldap.schema&lt;br /&gt;include     /etc/openldap/schema/ppolicy.schema&lt;br /&gt;include     /etc/openldap/schema/collective.schema&lt;br /&gt;&lt;br /&gt;#######################################################################&lt;br /&gt;# ldbm and/or bdb database definitions&lt;br /&gt;#######################################################################&lt;br /&gt;&lt;br /&gt;database    bdb&lt;br /&gt;suffix      "dc=indimail,dc=org"&lt;br /&gt;checkpoint  1024 15&lt;br /&gt;rootdn      "cn=Manager,dc=indimail,dc=org"&lt;br /&gt;rootpw      {SSHA}gDPX3cS87+B31mAF5zHCGtEJBYSuqrN/&lt;br /&gt;# The database directory MUST exist prior to running slapd AND&lt;br /&gt;# should only be accessible by the slapd and slap tools.&lt;br /&gt;# Mode 700 recommended.&lt;br /&gt;directory   /var/lib/ldap&lt;br /&gt;&lt;br /&gt;# Sample access control policy:&lt;br /&gt;#   Root DSE: allow anyone to read it&lt;br /&gt;#   Subschema (sub)entry DSE: allow anyone to read it&lt;br /&gt;#   Other DSEs:&lt;br /&gt;#       Allow self write access&lt;br /&gt;#       Allow authenticated users read access&lt;br /&gt;#       Allow anonymous users to authenticate&lt;br /&gt;#   Directives needed to implement policy:&lt;br /&gt;# access to dn.base="" by * read&lt;br /&gt;# access to dn.base="cn=Subschema" by * read&lt;br /&gt;# access to *&lt;br /&gt;#   by self write&lt;br /&gt;#   by users read&lt;br /&gt;#   by anonymous auth&lt;br /&gt;#&lt;br /&gt;# if no access controls are present, the default policy&lt;br /&gt;# allows anyone and everyone to read anything but restricts&lt;br /&gt;# updates to rootdn.  (e.g., "access to * by * read")&lt;br /&gt;#&lt;br /&gt;# rootdn can always read and write EVERYTHING!&lt;br /&gt;&lt;br /&gt;access to dn.subtree="ou=addressbook,dc=indimail,dc=org"&lt;br /&gt;    by anonymous auth&lt;br /&gt;    by self write&lt;br /&gt;    by users read&lt;br /&gt;access to *&lt;br /&gt;    by anonymous auth&lt;br /&gt;    by self read&lt;br /&gt;    by users read&lt;br /&gt;&lt;br /&gt;# Indices to maintain for this database&lt;br /&gt;index objectClass                       eq,pres&lt;br /&gt;#index ou,cn,mail,surname,givenname      eq,pres,sub&lt;br /&gt;#index uidNumber,gidNumber,loginShell    eq,pres&lt;br /&gt;#index uid,memberUid                     eq,pres,sub&lt;br /&gt;#index nisMapName,nisMapEntry            eq,pres,sub&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Make user that /etc/openldap/slapd.conf is owned by ldap and has write permissions for ldap user.&lt;br /&gt;&lt;br /&gt;As of now I prefer openldap using slapd.conf and not slapd.d for configuration.&lt;br /&gt;&lt;br /&gt;% sudo /bin/rm -r /etc/openldap/slapd.d&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;slapd Startup&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;My favourite method happens to be using djb's supervise and hence is one of the core compoment of the IndiMail package&lt;br /&gt;&lt;br /&gt;% cat &gt; /tmp/run1&lt;br /&gt;#!/bin/sh&lt;br /&gt;exec /usr/sbin/slapd -u ldap -f /etc/openldap/slapd.conf -d 0 2&gt;&amp;amp;1&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;cntrl-d&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;% cat &gt; /tmp/run2&lt;br /&gt;#!/bin/sh&lt;br /&gt;exec /var/indimail/bin/setuidgid qmaill \&lt;br /&gt;/var/indimail/bin/multilog t /var/log/indimail/slapd.389&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;cntrl-d&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;# create /service/.slapd.389 so that svscan does not discover this new service yet&lt;br /&gt;% sudo mkdir -p /service/.slapd.389/log&lt;br /&gt;% sudo mv /tmp/run2 /service/.slapd.389/log/run&lt;br /&gt;% sudo mv /tmp/run1 /service/.slapd.389/run&lt;br /&gt;% sudo chmod +x /service/.slapd.389/run /service/.slapd.389/log/run&lt;br /&gt;&lt;br /&gt;# rename .slapd.389 to slapd.389 for svscan to discover and start slapd&lt;br /&gt;% sudo mv /service/.slapd.389 /service/slapd.389&lt;br /&gt;&lt;br /&gt;% svstat /service/slapd.389&lt;br /&gt;/service/slapd.389/: up (pid 4069) 4 seconds&lt;br /&gt;&lt;eof bin="" sh="" exec="" usr="" sbin="" slapd="" u="" ldap="" f="" etc="" openldap="" conf="" d="" 0="" 2=""&gt;&lt;br /&gt;&lt;eof sh="" exec="" setuidgid="" qmaill="" bin="" multilog="" t="" var="" indimail="" eof="" create="" so="" that="" does="" not="" this="" new="" yet="" mkdir="" p="" run2="" tmp="" run1="" chmod="" x="" log="" run="" rename="" for="" svscan="" to="" discover="" and="" start="" mv="" sudo="" svstat="" 389="" service="" slapd="" up="" pid="" 4="" seconds=""&gt;&lt;eof bin="" sh="" exec="" usr="" sbin="" slapd="" u="" ldap="" f="" etc="" openldap="" conf="" d="" 0="" 2=""&gt;&lt;eof sh="" exec="" setuidgid="" qmaill="" bin="" multilog="" t="" var="" indimail="" eof="" create="" so="" does="" not="" new="" yet="" mkdir="" p="" run2="" tmp="" run1="" chmod="" log="" run="" rename="" for="" svscan="" discover="" mv="" sudo="" svstat="" 389="" slapd="" up="" pid="" 4="" seconds="" addressbook="" imported="" exported="" service="" using="" data="" interchange="" format="" as="" defined="" an="" specifies="" contents="" entry="" in="" human="" readable="" text="" this="" allows="" quick="" manipulation="" file="" entries="" into="" now="" that="" ldap="" server="" has="" been="" configured="" and="" is="" can="" conduct="" a="" simple="" search="" of="" naming="" context="" see="" directory="" information="" before="" we="" start="" import="" our="" should="" be="" similar="" to="" the="" example="" ldapsearch="" x="" b="" s="" objectclass="*)'" namingcontexts="" extended="" ldif="" ldapv3="" base=""&gt;&lt;span style="font-weight: bold;"&gt;AddressBook Entries&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Information can be imported and exported into an LDAP directory service using the LDAP Data Interchange Format (LDIF) as defined in RFC2849. An LDIF file specifies the contents of a directory entry in a human readable text format, this allows quick manipulation of a file to re-import similar entries into the directory.&lt;br /&gt;&lt;br /&gt;Now that the LDAP server has been configured and is running, we can conduct a simple search of the naming context to see our directory information before we start to import our entries.&lt;br /&gt;&lt;br /&gt;The "namingContexts" should be similar to the example below.&lt;br /&gt;&lt;br /&gt;% ldapsearch -x -b '' -s base '(objectclass=*)' namingContexts&lt;br /&gt;# extended LDIF&lt;br /&gt;#&lt;br /&gt;# LDAPv3&lt;br /&gt;# base &lt;&gt; with scope base&lt;br /&gt;# filter: (objectclass=*)&lt;br /&gt;# requesting: namingContexts&lt;br /&gt;&lt;br /&gt;dn:&lt;br /&gt;namingContexts: dc=indimail,dc=org&lt;br /&gt;&lt;br /&gt;# search result&lt;br /&gt;search: 2&lt;br /&gt;result: 0 Success&lt;br /&gt;&lt;br /&gt;# numResponses: 2&lt;br /&gt;# numEntries: 1&lt;br /&gt;&lt;br /&gt;The following LDIF file will create the hierarchical directory service structure that we will be using for indimail's address book. The first entry is that of the base directory and the second entry is for the Manager's (administrator) account. The last two entries are the two organisational units that we will use to store the authorised users (for adding security later) and the address book entries.&lt;br /&gt;&lt;br /&gt;The bolded entries should be changed to suit your configuration requirements.&lt;br /&gt;&lt;br /&gt;% cat &gt; addressbook.ldif&lt;br /&gt;# Domain entry&lt;br /&gt;dn: dc=indimail,dc=org&lt;br /&gt;o: IndiMail LDAP Server&lt;br /&gt;dc: indimail&lt;br /&gt;objectclass: dcObject&lt;br /&gt;objectclass: organization&lt;br /&gt;&lt;br /&gt;# Manager entry&lt;br /&gt;dn: cn=Manager,dc=indimail,dc=org&lt;br /&gt;cn: Manager&lt;br /&gt;objectclass: organizationalRole&lt;br /&gt;&lt;br /&gt;# Users&lt;br /&gt;dn: ou=users,dc=indimail,dc=org&lt;br /&gt;ou: users&lt;br /&gt;objectClass: top&lt;br /&gt;objectClass: organizationalUnit&lt;br /&gt;&lt;br /&gt;# Addressbook entry&lt;br /&gt;dn: ou=AddressBook,dc=indimail,dc=org&lt;br /&gt;ou: AddressBook&lt;br /&gt;objectClass: top&lt;br /&gt;objectClass: organizationalUnit&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;cntrl-d&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;% ldapadd -x -D 'cn=Manager,dc=indimail,dc=org' -W -f addressbook.ldif&lt;br /&gt;Enter LDAP Password:&lt;br /&gt;adding new entry "dc=indimail,dc=org"&lt;br /&gt;adding new entry "cn=Manager,dc=indimail,dc=org"&lt;br /&gt;adding new entry "ou=users,dc=indimail,dc=org"&lt;br /&gt;adding new entry "ou=addressbook,dc=indimail,dc=org"&lt;br /&gt;&lt;eof domain="" server="" eof="" ldapadd="" d="" w="" f="" enter="" adding="" new="" search="" requesting="" listing="" starting="" from="" base="" return="" all="" of="" added="" previous="" ldapsearch="" x="" b="" objectclass="*)'" dc="indimail,dc=org" dcobject="" organization="" home="" ldap="" network="" indimail="" cn="Manager,dc=indimail,dc=org" organizationalrole="" manager="" users="" com="" ou="users,dc=indimail,dc=org" addressbook="" top="" organizationalunit="" now="" that="" have="" defined="" and="" imported="" our="" we="" are="" able="" create="" user="" entries="" populate="" following="" is="" simple="" example="" ldif="" for="" a="" first="" line="" designates="" where="" about="" in="" directory="" the="" entry="" will="" belong="" when="" its="" this="" should="" be="" changed="" to="" suit="" your="" cat=""&gt;&lt;eof manvendra="" bhangui="" home="" velachery="" 12="" banana="" republic="" tn="" 600042="" 1111="" 1234="" 1235="" 5555="" 1236="" 0400="" 123="" com="" top="" inetorgperson="" eof="" added="" standard="" defines="" only="" add="" manager="" authenicating="" ldapadd="" x="" w="" f="" enter="" adding="" entry="" cn="Manvendra" section="" below="" details="" based="" on="" have="" been="" defined="" deny="" everyone="" however="" bind="" authenticated="" allowed="" change="" their="" own="" entries="" ou="addressbook,dc=indimail,dc=org" self="" anonymous="" auth="" read="" subtree="ou=addressbook,dc=indimail,dc=org" write="" control="" list="" may="" prone="" syntax="" errors="" accepted="" by="" tested="" before="" etc="" d="" slapd="" configtest="" configuration="" passes="" integrity="" sudo="" var="" indimail="" bin="" svc="" u="" service="" 389="" new="" controls="" prevent="" unauthorised="" access="" directory="" simple="" must="" prepared="" allow="" people="" authenticate="" with="" objects="" will="" server="" using="" remember="" everything="" ldif="" human="" readable="" so="" very="" bad="" especially="" if="" you="" following="" guide="" no="" plain="" passwords="" application="" used="" these="" saved="" store="" text="" does="" mean="" completely="" just="" means="" they="" not="" easily="" attacker="" subject="" value="" brute="" force="" but="" would="" take="" them="" an="" awfully="" long="" physical="" security="" still="" rzmbkch3wwemnhdanh="" l3oynzhsifpzf="" algorithm="" for="" hashed="" password="" changed="" at="" command="" line="" other="" default="" type="" slappasswd="" h="" ekwoqr8vr0sn46lo4wxg="=" can="" now="" created="" imported="" into="" ldap="" file="" uses="" uid="" user="" string="" distinguish="" and="" contents="" are="" all="" we="" need="" to="" create="" a="" basic="" authentication="" it="" should="" also="" be="" noted="" that="" this="" object="" stored="" in="" users="" organisational="" which="" is="" located="" outside="" of="" the="" address="" book="" cat=""&gt;&lt;eof&gt;&lt;br /&gt;The following LDAP search is requesting a listing of all entries starting from the base "dc=indimail,dc=org". This should return all of the entries that where added in the previous step.&lt;br /&gt;&lt;br /&gt;% ldapsearch -x -b 'dc=indimail,dc=org' '(objectclass=*)'&lt;br /&gt;&lt;br /&gt;# indimail.com&lt;br /&gt;dn: dc=indimail,dc=org&lt;br /&gt;objectClass: top&lt;br /&gt;objectClass: dcObject&lt;br /&gt;objectClass: organization&lt;br /&gt;o: Home LDAP Network&lt;br /&gt;dc: indimail&lt;br /&gt;&lt;br /&gt;# Manager, indimail.com&lt;br /&gt;dn: cn=Manager,dc=indimail,dc=org&lt;br /&gt;objectClass: organizationalRole&lt;br /&gt;cn: Manager&lt;br /&gt;&lt;br /&gt;# users, indimail.com&lt;br /&gt;dn: ou=users,dc=indimail,dc=org&lt;br /&gt;ou: users&lt;br /&gt;objectClass: top&lt;br /&gt;objectClass: organizationalUnit&lt;br /&gt;&lt;br /&gt;# addressbook, indimail.com&lt;br /&gt;dn: ou=addressbook,dc=indimail,dc=org&lt;br /&gt;ou: addressbook&lt;br /&gt;objectClass: top&lt;br /&gt;objectClass: organizationalUnit&lt;br /&gt;&lt;br /&gt;Now that we have defined and imported our directory scheme, we are able to create user entries to populate the addressbook. The following is a simple example LDIF entry for a contact.&lt;br /&gt;&lt;br /&gt;You can gain use slappasswd to generate a user password&lt;br /&gt;&lt;br /&gt;% slappasswd -h {MD5} -s manny&lt;br /&gt;{MD5}j+eKwOqr8vR0sN46lo4WXg==&lt;br /&gt;&lt;br /&gt;The first line (dn:) designates where about in the directory the entry will belong when its imported, this should be changed to suit your needs.&lt;br /&gt;&lt;br /&gt;% cat &gt; newcontact.ldif&lt;br /&gt;dn:uid=mbhangui,ou=addressbook,dc=indimail,dc=org&lt;br /&gt;uid: mbhangui&lt;br /&gt;cn: Manvendra Bhangui&lt;br /&gt;gn: Manvendra&lt;br /&gt;sn: Bhangui&lt;br /&gt;o: Consim Info Pvt. Ltd.&lt;br /&gt;l: Mandaivelli&lt;br /&gt;street: #94 Coconut Republic&lt;br /&gt;st: TN&lt;br /&gt;postalCode: 600028&lt;br /&gt;pager: +91 44 5555 1111&lt;br /&gt;homePhone: +91 44 5555 1234&lt;br /&gt;telephoneNumber: +91 44 5555 1235&lt;br /&gt;facsimileTelephoneNumber: +91 44 5555 1236&lt;br /&gt;mobile: +91 99401xxxxx&lt;br /&gt;mail: m.bhangui@gmail.com&lt;br /&gt;objectClass: top&lt;br /&gt;objectClass: inetOrgPerson&lt;br /&gt;userPassword: {MD5}j+eKwOqr8vR0sN46lo4WXg==&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;cntrl-d&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The contents of the LDIF file can be added into the directory service using the "ldapadd" command below.&lt;br /&gt;&lt;br /&gt;% ldapadd -x -D 'cn=Manager,dc=indimail,dc=org' -W -f newcontact.ldif&lt;br /&gt;Enter LDAP Password:&lt;br /&gt;adding new entry "uid=mbhangui,ou=addressbook,dc=indimail,dc=org"&lt;br /&gt;&lt;/eof&gt;&lt;/eof&gt;&lt;/eof&gt;&lt;/eof&gt;&lt;/eof&gt;&lt;/eof&gt;&lt;/eof&gt;&lt;br /&gt;&lt;eof bin="" sh="" exec="" usr="" sbin="" slapd="" u="" ldap="" f="" etc="" openldap="" conf="" d="" 0="" 2=""&gt;&lt;eof sh="" exec="" setuidgid="" qmaill="" bin="" multilog="" t="" var="" indimail="" eof="" create="" so="" that="" does="" not="" this="" new="" yet="" mkdir="" p="" run2="" tmp="" run1="" chmod="" x="" log="" run="" rename="" for="" svscan="" to="" discover="" and="" start="" mv="" sudo="" svstat="" 389="" service="" slapd="" up="" pid="" 4="" seconds=""&gt;&lt;eof bin="" sh="" exec="" usr="" sbin="" slapd="" u="" ldap="" f="" etc="" openldap="" conf="" d="" 0="" 2=""&gt;&lt;eof sh="" exec="" setuidgid="" qmaill="" bin="" multilog="" t="" var="" indimail="" eof="" create="" so="" does="" not="" new="" yet="" mkdir="" p="" run2="" tmp="" run1="" chmod="" log="" run="" rename="" for="" svscan="" discover="" mv="" sudo="" svstat="" 389="" slapd="" up="" pid="" 4="" seconds="" addressbook="" imported="" exported="" service="" using="" data="" interchange="" format="" as="" defined="" an="" specifies="" contents="" entry="" in="" human="" readable="" text="" this="" allows="" quick="" manipulation="" file="" entries="" into="" now="" that="" ldap="" server="" has="" been="" configured="" and="" is="" can="" conduct="" a="" simple="" search="" of="" naming="" context="" see="" directory="" information="" before="" we="" start="" import="" our="" should="" be="" similar="" to="" the="" example="" ldapsearch="" x="" b="" s="" objectclass="*)'" namingcontexts="" extended="" ldif="" ldapv3="" base=""&gt;&lt;eof domain="" server="" eof="" ldapadd="" d="" w="" f="" enter="" adding="" new="" search="" requesting="" listing="" starting="" from="" base="" return="" all="" of="" added="" previous="" ldapsearch="" x="" b="" objectclass="*)'" dc="indimail,dc=org" dcobject="" organization="" home="" ldap="" network="" indimail="" cn="Manager,dc=indimail,dc=org" organizationalrole="" manager="" users="" com="" ou="users,dc=indimail,dc=org" addressbook="" top="" organizationalunit="" now="" that="" have="" defined="" and="" imported="" our="" we="" are="" able="" create="" user="" entries="" populate="" following="" is="" simple="" example="" ldif="" for="" a="" first="" line="" designates="" where="" about="" in="" directory="" the="" entry="" will="" belong="" when="" its="" this="" should="" be="" changed="" to="" suit="" your="" cat=""&gt;&lt;eof manvendra="" bhangui="" home="" velachery="" 12="" banana="" republic="" tn="" 600042="" 1111="" 1234="" 1235="" 5555="" 1236="" 0400="" 123="" com="" top="" inetorgperson="" eof="" added="" standard="" defines="" only="" add="" manager="" authenicating="" ldapadd="" x="" w="" f="" enter="" adding="" entry="" cn="Manvendra" section="" below="" details="" based="" on="" have="" been="" defined="" deny="" everyone="" however="" bind="" authenticated="" allowed="" change="" their="" own="" entries="" ou="addressbook,dc=indimail,dc=org" self="" anonymous="" auth="" read="" subtree="ou=addressbook,dc=indimail,dc=org" write="" control="" list="" may="" prone="" syntax="" errors="" accepted="" by="" tested="" before="" etc="" d="" slapd="" configtest="" configuration="" passes="" integrity="" sudo="" var="" indimail="" bin="" svc="" u="" service="" 389="" new="" controls="" prevent="" unauthorised="" access="" directory="" simple="" must="" prepared="" allow="" people="" authenticate="" with="" objects="" will="" server="" using="" remember="" everything="" ldif="" human="" readable="" so="" very="" bad="" especially="" if="" you="" following="" guide="" no="" plain="" passwords="" application="" used="" these="" saved="" store="" text="" does="" mean="" completely="" just="" means="" they="" not="" easily="" attacker="" subject="" value="" brute="" force="" but="" would="" take="" them="" an="" awfully="" long="" physical="" security="" still="" rzmbkch3wwemnhdanh="" l3oynzhsifpzf="" algorithm="" for="" hashed="" password="" changed="" at="" command="" line="" other="" default="" type="" slappasswd="" h="" ekwoqr8vr0sn46lo4wxg="=" can="" now="" created="" imported="" into="" ldap="" file="" uses="" uid="" user="" string="" distinguish="" and="" contents="" are="" all="" we="" need="" to="" create="" a="" basic="" authentication="" it="" should="" also="" be="" noted="" that="" this="" object="" stored="" in="" users="" organisational="" which="" is="" located="" outside="" of="" the="" address="" book="" cat=""&gt;&lt;eof&gt;If you do not require an address book and just require a basic user object to use for authenticaton, a basic user object can be created and imported into the LDAP server. This file uses the "UID" (User ID) string to distinguish the object and the contents are all that we need to create a basic authentication mechanism.&lt;br /&gt;&lt;br /&gt;It should also be noted that this object is stored in the "users" organisational unit, which is located outside of the address book directory.=&lt;br /&gt;&lt;br /&gt;% cat &gt; useraccount.ldif&lt;br /&gt;dn:uid=postmaster,ou=users,dc=indimail,dc=org&lt;br /&gt;uid: postmaster&lt;br /&gt;userPassword: {MD5}j+eKwOqr8vR0sN46lo4WXg==&lt;br /&gt;objectClass: top&lt;br /&gt;objectClass: account&lt;br /&gt;objectClass: simpleSecurityObject&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;cntrl-d&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;% ldapadd -x -D 'cn=Manager,dc=indimail,dc=org' -W -f useraccount.ldif&lt;br /&gt;Enter LDAP Password:&lt;br /&gt;adding new entry "uid=postmaster,ou=users,dc=indimail,dc=org"&lt;br /&gt;&lt;br /&gt;For mbhangui to authenticate to the server, one needs to pass&lt;br /&gt;"uid=mbhangui,ou=users,dc=indimail,dc=org" as username along with the the plain text value of password, the hashed value is only for storage purposes.&lt;br /&gt;&lt;br /&gt;% ldapsearch -x -b 'ou=AddressBook,dc=indimail,dc=org' \&lt;br /&gt;-D "uid=mbhangui,ou=users,dc=indimail,dc=org" '(objectclass=*)' \&lt;br /&gt;-s sub -w manny&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Backing up LDAP Database&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To export&lt;br /&gt;% sudo /var/indimail/bin/svc -d /service/slapd.389&lt;br /&gt;% slapcat -vl /etc/openldap/backup_slapd.ldif&lt;br /&gt;% sudo /var/indimail/bin/svc -u /service/slapd.389&lt;br /&gt;&lt;br /&gt;To import&lt;br /&gt;% sudo /var/indimail/bin/svc -d /service/slapd.389&lt;br /&gt;% slapadd -vl /etc/openldap/backup_slapd.ldif&lt;br /&gt;% chown ldap.ldap /var/lib/ldap/*&lt;br /&gt;% sudo /var/indimail/bin/svc -u /service/slapd.389&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Email Client Settings&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The last steps in setting up the shared address book is to configure the users email clients to access the LDAP server.&lt;br /&gt;&lt;br /&gt;The following table contains some of the information needed to configure the client applications. Note the username will need to be written as the complete "distinguished name" value so the server knows which object to authenticate.&lt;br /&gt;&lt;br /&gt;LDAP Server      : your_host_IP:389&lt;br /&gt;Search Base      : ou=addressbook,dc=indimail,dc=org&lt;br /&gt;Login Method     : use distinguished name (if listed)&lt;br /&gt;Username         : uid=user,ou=addressbook,dc=indimail,dc=org&lt;br /&gt;Password         : As entered in newcontact.ldif file (plain text version)&lt;br /&gt;Secure Connection: Never (unless encryption has been configured)&lt;br /&gt;&lt;br /&gt;In the above 'user' is the actual user created in ldap by using ldapadd&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;References&lt;br /&gt;&lt;/span&gt;&lt;/eof&gt;&lt;/eof&gt;&lt;/eof&gt;&lt;/eof&gt;&lt;/eof&gt;&lt;/eof&gt;&lt;/eof&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.brennan.id.au/20-Shared_Address_Book_LDAP.html"&gt;http://www.brennan.id.au/20-Shared_Address_Book_LDAP.html&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.wains.be/mirrors/feldt.com/"&gt;http://www.wains.be/mirrors/feldt.com/&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://linsec.ca/Using_OpenLDAP_as_an_Address_Book"&gt;http://linsec.ca/Using_OpenLDAP_as_an_Address_Book&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;eof bin="" sh="" exec="" usr="" sbin="" slapd="" u="" ldap="" f="" etc="" openldap="" conf="" d="" 0="" 2=""&gt;&lt;eof sh="" exec="" setuidgid="" qmaill="" bin="" multilog="" t="" var="" indimail="" eof="" create="" so="" that="" does="" not="" this="" new="" yet="" mkdir="" p="" run2="" tmp="" run1="" chmod="" x="" log="" run="" rename="" for="" svscan="" to="" discover="" and="" start="" mv="" sudo="" svstat="" 389="" service="" slapd="" up="" pid="" 4="" seconds=""&gt;&lt;eof bin="" sh="" exec="" usr="" sbin="" slapd="" u="" ldap="" f="" etc="" openldap="" conf="" d="" 0="" 2=""&gt;&lt;eof sh="" exec="" setuidgid="" qmaill="" bin="" multilog="" t="" var="" indimail="" eof="" create="" so="" does="" not="" new="" yet="" mkdir="" p="" run2="" tmp="" run1="" chmod="" log="" run="" rename="" for="" svscan="" discover="" mv="" sudo="" svstat="" 389="" slapd="" up="" pid="" 4="" seconds="" addressbook="" imported="" exported="" service="" using="" data="" interchange="" format="" as="" defined="" an="" specifies="" contents="" entry="" in="" human="" readable="" text="" this="" allows="" quick="" manipulation="" file="" entries="" into="" now="" that="" ldap="" server="" has="" been="" configured="" and="" is="" can="" conduct="" a="" simple="" search="" of="" naming="" context="" see="" directory="" information="" before="" we="" start="" import="" our="" should="" be="" similar="" to="" the="" example="" ldapsearch="" x="" b="" s="" objectclass="*)'" namingcontexts="" extended="" ldif="" ldapv3="" base=""&gt;&lt;eof domain="" server="" eof="" ldapadd="" d="" w="" f="" enter="" adding="" new="" search="" requesting="" listing="" starting="" from="" base="" return="" all="" of="" added="" previous="" ldapsearch="" x="" b="" objectclass="*)'" dc="indimail,dc=org" dcobject="" organization="" home="" ldap="" network="" indimail="" cn="Manager,dc=indimail,dc=org" organizationalrole="" manager="" users="" com="" ou="users,dc=indimail,dc=org" addressbook="" top="" organizationalunit="" now="" that="" have="" defined="" and="" imported="" our="" we="" are="" able="" create="" user="" entries="" populate="" following="" is="" simple="" example="" ldif="" for="" a="" first="" line="" designates="" where="" about="" in="" directory="" the="" entry="" will="" belong="" when="" its="" this="" should="" be="" changed="" to="" suit="" your="" cat=""&gt;&lt;eof manvendra="" bhangui="" home="" velachery="" 12="" banana="" republic="" tn="" 600042="" 1111="" 1234="" 1235="" 5555="" 1236="" 0400="" 123="" com="" top="" inetorgperson="" eof="" added="" standard="" defines="" only="" add="" manager="" authenicating="" ldapadd="" x="" w="" f="" enter="" adding="" entry="" cn="Manvendra" section="" below="" details="" based="" on="" have="" been="" defined="" deny="" everyone="" however="" bind="" authenticated="" allowed="" change="" their="" own="" entries="" ou="addressbook,dc=indimail,dc=org" self="" anonymous="" auth="" read="" subtree="ou=addressbook,dc=indimail,dc=org" write="" control="" list="" may="" prone="" syntax="" errors="" accepted="" by="" tested="" before="" etc="" d="" slapd="" configtest="" configuration="" passes="" integrity="" sudo="" var="" indimail="" bin="" svc="" u="" service="" 389="" new="" controls="" prevent="" unauthorised="" access="" directory="" simple="" must="" prepared="" allow="" people="" authenticate="" with="" objects="" will="" server="" using="" remember="" everything="" ldif="" human="" readable="" so="" very="" bad="" especially="" if="" you="" following="" guide="" no="" plain="" passwords="" application="" used="" these="" saved="" store="" text="" does="" mean="" completely="" just="" means="" they="" not="" easily="" attacker="" subject="" value="" brute="" force="" but="" would="" take="" them="" an="" awfully="" long="" physical="" security="" still="" rzmbkch3wwemnhdanh="" l3oynzhsifpzf="" algorithm="" for="" hashed="" password="" changed="" at="" command="" line="" other="" default="" type="" slappasswd="" h="" ekwoqr8vr0sn46lo4wxg="=" can="" now="" created="" imported="" into="" ldap="" file="" uses="" uid="" user="" string="" distinguish="" and="" contents="" are="" all="" we="" need="" to="" create="" a="" basic="" authentication="" it="" should="" also="" be="" noted="" that="" this="" object="" stored="" in="" users="" organisational="" which="" is="" located="" outside="" of="" the="" address="" book="" cat=""&gt;&lt;eof&gt;&lt;br /&gt;&lt;/eof&gt;&lt;/eof&gt;&lt;/eof&gt;&lt;/eof&gt;&lt;/eof&gt;&lt;/eof&gt;&lt;/eof&gt;&lt;img src="http://feeds.feedburner.com/~r/Indimail/~4/QzCfjnTxZLc" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Indimail/~3/QzCfjnTxZLc/using-openldap-for-addressbook.html</link><author>noreply@blogger.com (Cprogrammer)</author><thr:total>21</thr:total><feedburner:origLink>http://indimail.blogspot.com/2010/06/using-openldap-for-addressbook.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-269688189640615970.post-160004317612040397</guid><pubDate>Fri, 21 May 2010 02:09:00 +0000</pubDate><atom:updated>2012-07-30T12:50:08.483+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">indimail-mini QMQP indimail</category><title>Mini IndiMail Installation</title><description>&lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt; 1.7.3 comes with option in svctool to install QMQP service. &lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt; 1.7.5 will come with RPM package indimail-mini which will allow you to install a mini indimail installation. A mini indimail installation comes up with a bare minimum list of programs to enable you to send out mails. A indimail-mini installation doesn't have a mail queue. Instead it gives each new message to a central server through QMQP.&lt;br /&gt;
&lt;br /&gt;
Many of my friends run web servers which need to send out emails. If you already have an installation of &lt;a href="http://www.indimail.org/"&gt;IndiMail messaging server&lt;/a&gt; on your network, you can quickly setup a mini indimail installation on your web server, without impacting the performance by using QMQP. To use QMQP service, you need to have QMQP service running on your IndiMail messaging server. All other servers (including your webservers) can have a indimail-mini installation.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-xwCoQWAtuNI/TjBH1sM93-I/AAAAAAAABjA/O9lqTO7rREw/s1600/mini-indimail.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="240" src="http://4.bp.blogspot.com/-xwCoQWAtuNI/TjBH1sM93-I/AAAAAAAABjA/O9lqTO7rREw/s320/mini-indimail.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;How do I set up a QMQP service?&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You need to have at least one host on your network offering QMQP service to your clients. IndiMail includes a QMQP server, qmail-qmqpd. Here's how to set up  QMQP service to authorized client hosts on your IndiMail messaging server.&lt;br /&gt;
&lt;br /&gt;
first create /var/indimail/etc/tcp.qmqp in tcprules format to allow queueing from the authorized hosts. make sure to deny connections from unauthorized hosts. for example, if queueing is allowed from 1.2.3.*:&lt;br /&gt;
&lt;br /&gt;
1.2.3.:allow&lt;br /&gt;
:deny&lt;br /&gt;
&lt;br /&gt;
Then create /var/indimail/etc/tcp.qmqp.cdb:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: 85%;"&gt;% sudo /var/indimail/bin/tcprules /var/indimail/etc/tcp.qmqp.cdb \&lt;br /&gt;
/var/indimail/etc/qmqp.tmp &amp;lt; /var/indimail/etc/tcp.qmqp&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You can change /var/indimail/etc/tcp.qmqp and run tcprules again at any time. Finally qmail-qmqpd to be run under supervise:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: 85%;"&gt;% sudo /var/indimail/sbin/svctool --qmqp=628 --servicedir=/service \&lt;br /&gt;
--qbase=/var/indimail/queue --qcount=5 --qstart=1 \&lt;br /&gt;
--cntrldir=control --localip=0 \&lt;br /&gt;
--maxdaemons=75 --maxperip=25 --fsync --syncdir \&lt;br /&gt;
--memory=104857600 --min-free=52428800&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
628 is the TCP port for QMQP.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;How do I install indimail-mini?&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
A indimail-mini installation is just like a indimail installation, except that it's much easier to set up:&lt;br /&gt;
&lt;br /&gt;
* You don't need MySQL&lt;br /&gt;
&lt;br /&gt;
* You don't need /var/indimail/alias. A indimail-mini installation doesn't do any local delivery.&lt;br /&gt;
&lt;br /&gt;
* You don't need indimail entries in /etc/group or /etc/passwd. indimail-mini runs with the same privileges as the user sending mail; it doesn't have any of its own files.&lt;br /&gt;
&lt;br /&gt;
* You don't need to start anything from your boot scripts. indimail-mini doesn't have a queue, so it doesn't need a long-running queue manager.&lt;br /&gt;
&lt;br /&gt;
* You don't need to add anything to inetd.conf. A null client doesn't receive incoming mail.&lt;br /&gt;
&lt;br /&gt;
Here's what you do need:&lt;br /&gt;
&lt;br /&gt;
* qmail-qmqpc, forward, qmail-inject, sendmail, predate, datemail, mailsubj, qmail-showctl, maildirmake, maildir2mbox, maildirwatch, qail, elq, and pinq in /var/indimail/bin;&lt;br /&gt;
&lt;br /&gt;
* a symbolic link to qmail-qmqpc from /var/indimail/bin/qmail-queue;&lt;br /&gt;
&lt;br /&gt;
* symbolic links to /var/indimail/bin/sendmail from /usr/sbin/sendmail and /usr/lib/sendmail (for Fedora see the topic on /usr/sbin/alternatives below)&lt;br /&gt;
&lt;br /&gt;
* all the manual pages in /var/indimail/man;&lt;br /&gt;
&lt;br /&gt;
You can install all the above by manually copying the binaries and man pages from a host having standard IndiMail installation or you can using the indimail-mini RPM&lt;br /&gt;
&lt;br /&gt;
% sudo rpm -ivh indimail-mini-1.7.5-1.1.i386.rpm&lt;br /&gt;
&lt;br /&gt;
Apart from the binaries, you need to do the following&lt;br /&gt;
&lt;br /&gt;
* a list of IP addresses of QMQP servers, one per line, in /var/indimail/control/qmqpservers;&lt;br /&gt;
&lt;br /&gt;
* a copy of /var/indimail/control/me, /var/indimail/control/defaultdomain, and /var/indimail/control/plusdomain from your central server, so that qmail-inject uses appropriate host names in outgoing mail; and&lt;br /&gt;
&lt;br /&gt;
* this host's name in /var/indimail/control/idhost, so that qmail-inject generates Message-ID without any risk of collision.&lt;br /&gt;
&lt;br /&gt;
Everything can be shared across hosts except for /var/indimail/control/idhost.&lt;br /&gt;
&lt;br /&gt;
Remember that users won't be able to send mail if all the QMQP servers are down. Most sites have two or three independent QMQP servers.&lt;br /&gt;
&lt;br /&gt;
Note that users can still use all the qmail-inject environment variables to control the appearance of their outgoing messages.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;Fedora - Using /usr/sbin/alternatives&lt;/span&gt;&lt;br /&gt;
Sometimes two or more Fedora package exist that serve the same purpose.  The &lt;i&gt;alternatives&lt;/i&gt; system provides a mechanism for selecting an  active default application from several valid alternatives. You can use the &lt;span style="font-style: italic;"&gt;alternatives&lt;/span&gt; system to configure as an alternative MTA for your system. Using alternatives, you don't have to create the links to /var/indimail/bin/sendmail manually as instructed above.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: 85%;"&gt;% sudo /usr/sbin/alternatives --install \&lt;br /&gt;
/usr/sbin/sendmail mta /var/indimail/bin/sendmail 120 \&lt;br /&gt;
--slave /usr/share/man/man8/sendmail.8.gz mta-sendmailman \&lt;br /&gt;
/var/indimail/man/man8/qmail-inject.8.gz \&lt;br /&gt;
--slave /usr/lib/sendmail mta-sendmail \&lt;br /&gt;
/var/indimail/bin/sendmail&lt;br /&gt;
/usr/sbin/alternatives --set mta /var/indimail/bin/sendmail&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can download IndiMail at&lt;br /&gt;
&lt;a href="http://sourceforge.net/projects/indimail/"&gt;http://sourceforge.net/projects/indimail/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The RPM can be downloaded from&lt;br /&gt;
&lt;a href="http://download.opensuse.org/repositories/home:/indimail/"&gt;http://download.opensuse.org/repositories/home:/indimail/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: This document is based on '&lt;a href="http://cr.yp.to/qmail/mini.html"&gt;Installing min-qmail&lt;/a&gt;' by djb&lt;img src="http://feeds.feedburner.com/~r/Indimail/~4/XjLIZQmDQvs" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Indimail/~3/XjLIZQmDQvs/mini-indimail-installation.html</link><author>noreply@blogger.com (Cprogrammer)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-xwCoQWAtuNI/TjBH1sM93-I/AAAAAAAABjA/O9lqTO7rREw/s72-c/mini-indimail.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://indimail.blogspot.com/2010/05/mini-indimail-installation.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-269688189640615970.post-6541894185002371495</guid><pubDate>Sun, 02 May 2010 05:30:00 +0000</pubDate><atom:updated>2010-05-02T11:38:59.938+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">"instant bulletins" bulletin vbulletin IndiMail bulkmail</category><title>Instant Mail to domains added by vadddomain</title><description>&lt;a href="http://www.indimail.org"&gt;IndiMail&lt;/a&gt; has a program called &lt;span style="font-weight: bold;"&gt;vbulletin&lt;/span&gt; using which you can instantly email all your subscribers in a domain that has been created using vadddomain. Whenever an authentication requests comes to IndiMail through POP3, IMAP or authenticated SMTP, a hook called &lt;span style="font-weight: bold;"&gt;Login_Tasks&lt;/span&gt; gets called. One of the job that &lt;span style="font-weight: bold;"&gt;Login_Tasks&lt;/span&gt; does is to look for a file, in &lt;a href="http://www.faqs.org/rfcs/rfc822.html"&gt;RFC822&lt;/a&gt; format, with ",all"  in the end of the filename. If such a file is found, it is copied to the user's Maildir. By using the timestamp of the original file, &lt;span style="font-weight: bold;"&gt;Login_Tasks&lt;/span&gt; also ensures that the file is copied once only.&lt;br /&gt;&lt;br /&gt;The good thing about using bulletins is that the email is available instantly to all users. No queues, no delays and a huge saving of system resources.&lt;br /&gt;&lt;br /&gt;You can manually copy the file to &lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;/var/indimail/control/domain_name/bulk_mail&lt;/span&gt;&lt;/span&gt; directory or use the &lt;span style="font-weight: bold;"&gt;vbulletin&lt;/span&gt; command&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;% vbulletin -f /tmp/new_offers.eml -a example.com&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;vbulletin&lt;/span&gt; is especially useful when you want to target a subsection of your users or when you have large number of mail delivery hosts in an IndiMail cluster.&lt;br /&gt;&lt;br /&gt;Read the man page &lt;span style="font-weight: bold;"&gt;vbulletin(1)&lt;/span&gt; for more details&lt;img src="http://feeds.feedburner.com/~r/Indimail/~4/CHGYtRtuZxg" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Indimail/~3/CHGYtRtuZxg/instant-mail-to-domains-added-by.html</link><author>noreply@blogger.com (Cprogrammer)</author><thr:total>0</thr:total><feedburner:origLink>http://indimail.blogspot.com/2010/05/instant-mail-to-domains-added-by.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-269688189640615970.post-6633987478891216753</guid><pubDate>Thu, 29 Apr 2010 06:48:00 +0000</pubDate><atom:updated>2010-05-16T08:11:44.221+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">"spam control" BADIP qmail-smtpd indimail</category><title>Spam Control using badip control file</title><description>&lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt; has many methods to help deal with spam. For detecting spam, &lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt; uses &lt;a href="http://bogofilter.sourceforge.net/"&gt;bogofilter&lt;/a&gt; a fast bayesian spam filter. &lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt;'s qmail-smtpd which provides SMTP protocol is neatly integrated with bogofilter. When &lt;a href="http://bogofilter.sourceforge.net/"&gt;bogofilter&lt;/a&gt; detects spam, qmail-smtpd prints the X-Bogosity header as part of SMTP transaction log&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;% grep "X-Bogosity, Yes" /var/log/indimail/smtpd.25/current&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;@400000004bc8183f01fcbc54 qmail-smtpd: pid 16158 from ::ffff:88.191.35.203&lt;/span&gt;&lt;span style="font-size:78%;"&gt; HELO &lt;indimail.org&gt; MAIL from &lt;bitoza@gmail.com&gt; xxxx RCPT yyyy &lt;mailstore@indimail.org&gt; AUTH &lt;local-rcpt&gt; Size: 4871 &lt;span style="font-weight: bold;"&gt;X-Bogosity: Yes, spamicity=0.999616, cutoff=9.90e-01, ham_cutoff=0.00e+00&lt;/span&gt;, queueID=6cs66604wfk,&lt;/local-rcpt&gt;&lt;/mailstore@indimail.org&gt;&lt;/bitoza@gmail.com&gt;&lt;/indimail.org&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The value "Yes" in X-Bogosity indicates spam. You can tell qmail-smtpd to reject such mails at SMTP just by doing&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;# echo 1 &gt; /service/qmail-smtpd.25/variables/REJECTSPAM&lt;br /&gt;# svc -u /service/qmail-smtpd.25&lt;br /&gt;# svc -d /service/qmail-smtpd.25&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;SMTP clients which tries to send a spam mail will get the following error at the end of the SMTP transaction&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;554 SPAM or junk mail threshold exceeded (#5.7.1)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The mail will get bounced. In some cases you would want to issue temporary error to such clients. In the above SMTP transaction log, the IP address of the client was 88.191.35.203. To put such client's into &lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt;'s SPAM blacklist, you just need to put the IP address in the control file /var/indimail/control/badip&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;# echo 88.191.35.203 &gt;&gt; /var/indimail/control/badip&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For turning on the BADIP functionality, you need to set the BADIPCHECK or the BADIP environment variable. i.e.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;# echo badip &gt; /service/qmail-smtpd.25/variables/BADIP&lt;br /&gt;# svc -d /service/qmail-smtpd.25&lt;br /&gt;# svc -u /service/qmail-smtpd.25&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Clients whose IP match an entry in badip will be greeted as below&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;421 indimail.org sorry, your IP (::ffff:88.191.35.203) is temporarily denied (#4.7.1)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Also the client will not be able to carry out any SMTP transactions like ehlo, MAIL FROM, RCPT TO, etc&lt;br /&gt;&lt;br /&gt;A large ISP can run the following command every day once in cron&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;grep "X-Bogosity, Yes" /var/log/indimail/qmail.smtpd.25/current &gt; /var/indimail/control/badip&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If your badip files becomes very large, you can also take advantage of &lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt;'s ability to use cdb (or you could use MySQL too)&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;% sudo /var/indimail/bin/qmail-cdb badip&lt;/span&gt;&lt;/span&gt;&lt;img src="http://feeds.feedburner.com/~r/Indimail/~4/Xf8H6U2Dg-s" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Indimail/~3/Xf8H6U2Dg-s/spam-control-using-badip-control-file.html</link><author>noreply@blogger.com (Cprogrammer)</author><thr:total>3</thr:total><feedburner:origLink>http://indimail.blogspot.com/2010/04/spam-control-using-badip-control-file.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-269688189640615970.post-5700170800199294216</guid><pubDate>Mon, 26 Apr 2010 02:52:00 +0000</pubDate><atom:updated>2011-11-17T22:25:41.150+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">indimail web "web admin" iwebadmin</category><title>Web Administration for IndiMail</title><description>I always find using the web ugly. It is a pain using the mouse almost all the time to do anything. One of the reasons I have never focussed on building a web administration tool for &lt;a href="http://www.indimail.org/"&gt;Indimail&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Lately my users have been pestering me if something can be done about it. I have no knowledge of web scripting, etc. But using some bit of common sense, I have managed to make &lt;a href="http://sourceforge.net/projects/qmailadmin/"&gt;qmailadmin&lt;/a&gt; work with &lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt; by modifying the source code (lucky for me, they are written in C).&lt;br /&gt;
&lt;br /&gt;
For the admin user it provides&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;user addition&lt;/li&gt;
&lt;li&gt;user deletion&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;password change&lt;/li&gt;
&lt;li&gt;adding autoresponders&lt;/li&gt;
&lt;li&gt;deleting autoresponders&lt;/li&gt;
&lt;li&gt;modifying autoresponders&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;adding forwarding addresses&lt;/li&gt;
&lt;li&gt;deleting forwarding addresses&lt;/li&gt;
&lt;li&gt;modifying forwarding addreses&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;quota modification&lt;/li&gt;
&lt;/ol&gt;For users other than the postmaster account it provides&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Password change&lt;/li&gt;
&lt;li&gt;add/modify/delete forwarding addresses&lt;/li&gt;
&lt;li&gt;add/modify/delete autoresponder&lt;/li&gt;
&lt;/ol&gt;iwebadmin can be downloaded from &lt;a href="http://sourceforge.net/projects/indimail/"&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://sourceforge.net/projects/indimail/files/iwebadmin"&gt;&lt;span style="font-size: 85%;"&gt;http://sourceforge.net/projects/indimail/files/iwebadmin&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The RPM / Yum Repo file can be downloaded from&lt;br /&gt;
&lt;a href="http://download.opensuse.org/repositories/home:/indimail:/iwebadmin/"&gt;&lt;span style="font-size: 85%;"&gt;http://download.opensuse.org/repositories/home:/indimail:/iwebadmin/&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
You can download IndiMail at&lt;br /&gt;
&lt;a href="http://sourceforge.net/projects/indimail/"&gt;http://sourceforge.net/projects/indimail/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The  RPM can be downloaded from&lt;br /&gt;
&lt;a href="http://download.opensuse.org/repositories/home:/indimail/"&gt;http://download.opensuse.org/repositories/home:/indimail/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The screen shots are below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-7FG83o4OiO4/TsU8gFjvtrI/AAAAAAAABlA/yDcvPj3i2fE/s1600/iwebadmin1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://3.bp.blogspot.com/-7FG83o4OiO4/TsU8gFjvtrI/AAAAAAAABlA/yDcvPj3i2fE/s320/iwebadmin1.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://1.bp.blogspot.com/_JqmdYUUx_oQ/S9UCl5gC6OI/AAAAAAAABYc/3qItXQ0zzoE/s1600/webadmin4.png"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5464276572997609698" src="http://1.bp.blogspot.com/_JqmdYUUx_oQ/S9UCl5gC6OI/AAAAAAAABYc/3qItXQ0zzoE/s320/webadmin4.png" style="cursor: pointer; height: 200px; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://2.bp.blogspot.com/_JqmdYUUx_oQ/S9UClbDFzhI/AAAAAAAABYU/1AutiSnObdY/s1600/webadmin3.png"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5464276564823100946" src="http://2.bp.blogspot.com/_JqmdYUUx_oQ/S9UClbDFzhI/AAAAAAAABYU/1AutiSnObdY/s320/webadmin3.png" style="cursor: pointer; height: 200px; width: 320px;" /&gt;&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/Indimail/~4/a3E0kF3INyk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Indimail/~3/a3E0kF3INyk/web-administration-for-indimail.html</link><author>noreply@blogger.com (Cprogrammer)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-7FG83o4OiO4/TsU8gFjvtrI/AAAAAAAABlA/yDcvPj3i2fE/s72-c/iwebadmin1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://indimail.blogspot.com/2010/04/web-administration-for-indimail.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-269688189640615970.post-7740795690377770806</guid><pubDate>Sat, 24 Apr 2010 13:45:00 +0000</pubDate><atom:updated>2010-05-03T12:35:22.317+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">indimail "post execution handle"</category><title>Post Handle</title><description>&lt;a href="http://www.indimail.org/"&gt;IndiMail&lt;/a&gt; provides a handle post successful operation of few programs.  A post execution handle is a program  with the same name as that of the calling program but in the directory /var/indimail/libexec.  On successful completion, such programs will execute the handle program and return the status of the called handle program.&lt;br /&gt;&lt;br /&gt;Example of using a handle is when adding a user, you want vuserinfo to be run.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;% cat /var/indimail/libexec/vadduser&lt;/span&gt;&lt;br /&gt;exec /var/indimail/bin/vuserinfo $1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you have the above, then this is what will happen when you add a user&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;% sudo /var/indimail/bin/vadduser test05@example.com&lt;/span&gt;&lt;br /&gt;New IndiMail password for test05@example.com:&lt;br /&gt;Retype new IndiMail password:&lt;br /&gt;name          : test05@example.com&lt;br /&gt;passwd        : $1$awb5a5oV$/3rsmlKSu.wzwIFhBzMf7/ (MD5)&lt;br /&gt;uid           : 1&lt;br /&gt;gid           : 0&lt;br /&gt;              -all services available&lt;br /&gt;gecos         : test05&lt;br /&gt;dir           : /home/mail/T2Zsym/example.com/test05 (missing)&lt;br /&gt;quota         : 5242880 [5.00 Mb]&lt;br /&gt;curr quota    : 0S,0C&lt;br /&gt;Mail Store IP : 192.168.1.100 (Clustered - local)&lt;br /&gt;Mail Store ID : 1000&lt;br /&gt;Sql Database  : 192.168.1.100:indimail:ssh-1.5-&lt;br /&gt;Table Name    : indimail&lt;br /&gt;Relay Allowed : NO&lt;br /&gt;Days inact    : 0 days 00 Hrs 00 Mins 00 Secs&lt;br /&gt;Added   On    : (      127.0.0.1) Sat Apr 24 19:49:06 2010&lt;br /&gt;last  auth    : Not yet logged in&lt;br /&gt;last  IMAP    : Not yet logged in&lt;br /&gt;last  POP3    : Not yet logged in&lt;br /&gt;PassChange    : Not yet Changed&lt;br /&gt;Inact Date    : Not yet Inactivated&lt;br /&gt;Activ Date    : (      127.0.0.1) Sat Apr 24 19:49:06 2010&lt;br /&gt;Delivery Time : No Mails Delivered yet / Per Day Limit not configured&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;I personally use post execution handle for adding some mandatory users every time I add a new domain. So this is what my vadddomain handle looks like&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;% cat /var/indimail/libexec/vadddomain&lt;/span&gt;&lt;br /&gt;/var/indimail/bin/vdominfo $1&lt;br /&gt;/var/indimail/bin/valias -i '&amp;amp;register-spam' register-spam@$1&lt;br /&gt;/var/indimail/bin/valias -i '&amp;amp;register-ham' register-ham@$1&lt;br /&gt;/var/indimail/bin/valias -i '&amp;amp;spam' spam@$1&lt;br /&gt;/var/indimail/bin/valias -i '&amp;amp;ham' ham@$1&lt;br /&gt;/var/indimail/bin/vadduser -e prefilt@$1  xxxxxxxx&lt;br /&gt;/var/indimail/bin/vadduser -e postfilt@$1 xxxxxxxx&lt;br /&gt;/var/indimail/bin/vcfilter -i -t spamFilter -c 3 -k "Yes, spamicity=" -f Spam -b 0 -h 33 prefilt@$1&lt;br /&gt;/bin/ls -dl /var/indimail/domains/$1&lt;br /&gt;/bin/ls -al /var/indimail/domains/$1&lt;br /&gt;exit 0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can download IndiMail at&lt;br /&gt;&lt;a href="http://sourceforge.net/projects/indimail/"&gt;http://sourceforge.net/projects/indimail/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The RPM can be downloaded from&lt;br /&gt;&lt;a href="http://download.opensuse.org/repositories/home:/indimail/"&gt;http://download.opensuse.org/repositories/home:/indimail/&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/Indimail/~4/vrwu06fYywA" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Indimail/~3/vrwu06fYywA/post-handle.html</link><author>noreply@blogger.com (Cprogrammer)</author><thr:total>2</thr:total><feedburner:origLink>http://indimail.blogspot.com/2010/04/post-handle.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-269688189640615970.post-4580322213776466651</guid><pubDate>Mon, 19 Apr 2010 15:49:00 +0000</pubDate><atom:updated>2010-04-19T21:46:35.901+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">envrules qmail-smtpd spawn-filter indimail qmail</category><title>Introducing envrules for SMTP</title><description>&lt;a href="http://www.indimail.org"&gt;IndiMail&lt;/a&gt; allows you to configure quite many things using environment variables. Just set the environment variable &lt;span style="font-weight: bold;"&gt;CONTROLDIR=control2&lt;/span&gt; and all qmail components of IndiMail start looking for control files in /var/indimail/control2. You can set &lt;span style="font-weight: bold;"&gt;CONTROLDIR=&lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic;"&gt;/etc/indimail&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; and all control files can be conveniently placed in &lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;/etc/indimail&lt;/span&gt;&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;There are more than 200 such variables which you can modify to alter IndiMail to behave the way you want it to. It gets even better with &lt;span style="font-weight: bold;"&gt;envrules&lt;/span&gt;, where you can have IndiMail behave differently for different users.&lt;br /&gt;&lt;br /&gt;In qmail-smtpd, specific  environment variables can be set for specific senders in the file &lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;/var/indimail/control/from.envrules&lt;/span&gt;&lt;/span&gt;.  The format of this file is of the form&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;pat:envar1=val,envar2=val,...]&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;where  &lt;span style="font-weight: bold;"&gt;pat&lt;/span&gt; is a regular expression which matches a sender&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;envar1&lt;/span&gt;, &lt;span style="font-weight: bold;"&gt;envar2&lt;/span&gt; are list of environment variables to be set. If &lt;span style="font-weight: bold;"&gt;val&lt;/span&gt; is omitted, the environment  variable is unset.&lt;br /&gt;&lt;br /&gt;The  name of the control file can be overridden by the environment variable FROMRULES.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;  &lt;span style="font-weight: bold;font-size:85%;" &gt;answerme@save*:DATABYTES=2000000, MAXRECIPIENT=2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The above causes the sender answerme@saveme.com to have a message limit of 2 Mb and qmail-smtpd will allow only 2 recipients in a single session.&lt;br /&gt;&lt;br /&gt;Another example&lt;br /&gt;&lt;br /&gt;  &lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;ceo@mycompany.com:CONTROLDIR=control2,QUEUE_BASE=/ramdisk/queue&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;causes all emails sent by ceo@mycompany.com to use the control files in &lt;span style="font-style: italic;font-size:85%;" &gt;&lt;span style="font-weight: bold;"&gt;/var/indimail/control2&lt;/span&gt;&lt;/span&gt; and a fast queue in &lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;/ramdisk/queue&lt;/span&gt;&lt;/span&gt;. concurrencyremote in /var/indimail/control2 can have a high value to allow higher concurrency compared to emails sent by users other than ceo@mycompany.com&lt;br /&gt;&lt;br /&gt;Application of envrules can be exploited as per your imagination. The most common application of envrules would be to set different limits for different users.&lt;br /&gt;&lt;br /&gt;Do man &lt;span style="font-weight: bold;"&gt;qmail-smtpd(8)&lt;/span&gt; to know the full list of environment variables that can be controlled using &lt;span style="font-weight: bold;"&gt;envrules&lt;/span&gt;.&lt;img src="http://feeds.feedburner.com/~r/Indimail/~4/xmzpNf_tHg4" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Indimail/~3/xmzpNf_tHg4/introducing-envrules-for-smtp.html</link><author>noreply@blogger.com (Cprogrammer)</author><thr:total>0</thr:total><feedburner:origLink>http://indimail.blogspot.com/2010/04/introducing-envrules-for-smtp.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-269688189640615970.post-5939234513351109105</guid><pubDate>Fri, 16 Apr 2010 04:41:00 +0000</pubDate><atom:updated>2010-04-16T11:04:25.998+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">cdb MySQL "control files" IndiMail qmail</category><title>qmail control files in plain text, cdb or MySQL</title><description>&lt;a href="http://www.indimail.org"&gt;IndiMail&lt;/a&gt; provides enormous flexibility in where you can put your control files. If you define environment variable CONTROLDIR=/var/indimail/control and all &lt;a href="http://www.indimail.org"&gt;IndiMail&lt;/a&gt; programs will look for control files in /var/indimail/control. Define CONTROLDIR=/etc/indimail and all programs look for configuration files in /etc/indimail.&lt;br /&gt;&lt;br /&gt;A little known feature of &lt;a href="http://www.indimail.org"&gt;IndiMail&lt;/a&gt; allows some of your control files to be in &lt;a href="http://en.wikipedia.org/wiki/Plain_text"&gt;plain text&lt;/a&gt;, &lt;a href="http://cr.yp.to/cdb.html"&gt;cdb&lt;/a&gt; or in &lt;a href="http://www.mysql.com/"&gt;MySQL&lt;/a&gt;. These control files include authdomains, badhelo, badext, badmailfrom, badrcptto, blackholedsender, blackholedrcpt, chkrcptdomains, goodrcptto, relaymailfrom and spamignore. If you have quite a large number of entries in any of the above control files, you can expect a significant performance gains by having these control files in cdb or MySQL.&lt;br /&gt;&lt;br /&gt;The mechanism is quite simple. For example, if you have the control file badmailfrom, qmail-smtpd will use badmailfrom. If you have the file badmailfrom.cdb, qmail-smtpd will first do cdb lookup in badmailfrom.cdb. To create badmailfrom.cdb, you need to run the command.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;% sudo /var/indimail/bin/qmail-cdb badmailfrom&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can also have your entries in a MySQL table. Let say you have a MySQL server on the server localhost, a database named 'indimail' with user 'indimail' having password 'ssh-1.5-'. To enable the control file in MySQL you need to create the control file with a .sql extension. The following enables the badmailfrom in MySQL&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;# echo "localhost:indimail:ssh-1.5-:indimail:badmailfrom" &gt; badmailfrom.sql&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Once you have created a file badmailfrom.sql, qmail-smtpd will connect to the MySQL server on localhost and look for entry in the column 'email' in the table badmailfrom. If this table does not exist, qmail-smtpd will create an empty table using the following create statement&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;create table badmailfrom (email char(64) NOT NULL, timestamp timestamp NOT NULL,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  primary key (email), index  timestamp (timestamp))&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;You can use the MySQL client to insert entries. e.g.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:85%;" &gt;MySQL &gt; insert into badmailfrom (email) values ('testuser@example.com');&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you have all the 3 versions of control files existing, IndiMail will first do a cdb lookup, followed by MySQL lookup and finally look into the plain text control file.&lt;br /&gt;&lt;br /&gt;Version 1.7.4 of indiMail will come with a utility qmail-sql which will allow you to create the MySQL table and also insert values from command line or convert an existing plain text version to MySQL.&lt;img src="http://feeds.feedburner.com/~r/Indimail/~4/ycS9EoCh8U8" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Indimail/~3/ycS9EoCh8U8/qmail-control-files-in-plain-text-cdb.html</link><author>noreply@blogger.com (Cprogrammer)</author><thr:total>0</thr:total><feedburner:origLink>http://indimail.blogspot.com/2010/04/qmail-control-files-in-plain-text-cdb.html</feedburner:origLink></item></channel></rss>
