LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] postfix/mail delivery

[ILUG] postfix/mail delivery

John P . Looney john at antefacto.com
Wed Feb 7 11:27:37 GMT 2001


On Wed, Feb 07, 2001 at 11:11:16AM +0000, Gary Coady mentioned:
> And you can tell procmail to use those variables then for delivery?

 I'm more thinking of bypassing procmail completely, and writing my own.
done...

logger -p mail.info -t postfix/mysql_delivery "ENV=`env`"
if [ "x$USER" = "x" ] ; then
        logger -p mail.info -t postfix/mysql_delivery "\$USER not set"
        exit -1
fi
# valen 5d2e19393cc5ef67        1       1000    Test user /mnt/cluster/mailboxes/1/0/0/0/0        /bin/bash       XXXXX
PASSWD=`echo "select * from users where username='$USER'" | mysql -B -s
--user=pf_user --password=pf_pass postfix`
HOMEDIR=`echo $PASSWD| cut -f 6 `
if [ -d ${HOMEDIR} ] ; then
   if [ ! -d ${HOMEDIR}/new ] ; then
      rm -rf ${HOMEDIR}/{new,tmp,cur}
      mkdir -p ${HOMEDIR}/{new,tmp,cur}
      while read ; do
          echo $ARSE >> "${HOMEDIR}/new/$PID.$PPID.$RANDOM.`date +%s`"
          logger -p mail.info -t postfix/mysql_delivery "Delivery mail for $USER to ${HOMEDIR}/new"
      done
   fi
else
    logger -p mail.info -t postfix/mysql_delivery "Homedir for user $USER
does not exist"
fi

 However...how do I tell procmail "try delivery it locally, you know you
want to " ? (delves into source)

Kate

-- 
 When I say 'free', I mean 'free': free from bond, of chain or command: 
to go where you will, even to Mordor, Saruman, if you desire. " 
    -- Gandalf, paraphrasing the choice between Free and Non-free software




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell