HOWEVER, I need to implement maildrop in there, and I seem to be hitting a snag. I've followed his directions, which work unless more than one email address is sent to. If a single address is sent mail, no problem, but any kind of additional email address (including cc and bcc) is sent to, it fails. I've added in some extra logging on the .mailfilter file, and I've made changes I've seemed to need to to make it work under my system, which I'll post below, along with logs that I've generated.
This is the last 'hurdle' - once this is working, I can finally go full-bore on postfix, which is what I'm really looking forward to.
I apologize for the long set of info - but I'm really stuck, and I figure this might give someone enough to work on.
Any suggestions? I thank you again for your time.
--Bruce
MY CURRENT MASTER.CF MAILDROP LINES:
maildrop unix - n n - - pipe
flags=R user=vmail argv=/usr/bin/maildrop-mysql -d vmail ${recipient} [EMAIL PROTECTED] ${extension} ${user} ${nexthop} ${sender}
HOWTO SUGGESTED LINES: (NOT USED)
maildrop unix - n n - - pipe
flags=R user=vmail argv=/usr/bin/maildrop -d [EMAIL PROTECTED] ${extension} ${recipient} ${user} ${nexthop} ${sender}
LOG INFO:
THIS ONE WORKED - ONE ADDRESS: (SEE .MAILFILTER SCRIPT BELOW FOR LOG PATTERN)
MAILFILTER::[EMAIL PROTECTED]:greg:oec-sys.com:[EMAIL PROTECTED]:/home/vmail/oec-sys.com/greg/.:[EMAIL PROTECTED]:vmail
THIS ONE FAILED - MULTIPLE ADDR.
MAILFILTER: [EMAIL PROTECTED]:::[EMAIL PROTECTED]:[EMAIL PROTECTED]:/home/vmail/[EMAIL PROTECTED]//.:[EMAIL PROTECTED]:vmail
MY .MAILFILTER FILE # # Import variables #
LOGNAME=tolower("$LOGNAME")
#OTHER="$1"
EXTENSION="$3"
RECIPIENT=tolower("$1")
USER="$4"
HOST="$5"
SENDER="$6"
DOMAIN="$7"
DEFAULT="/home/vmail/$HOST/$USER/."
ALLOFIT="$*"`/usr/bin/logger -pmail.info MAILFILTER: $ALLOFIT`
`/usr/bin/logger -pmail.info MAILFILTER: $EXTENSION:$RECIPIENT:$USER:$HOST:$SENDER:$DEFAULT:$OTHER:$LOGNAME`
if ( "$EXTENSION" ne "" )
{
DELIMITER="+"
# SENDER=$OTHER
}if (!$SENDER)
{
SENDER = "<>"
}# # Autocreate maildir, if not existant #
`test -e /home/vmail/$HOST`
if ( $RETURNCODE != 0 )
{
`/bin/mkdir /home/vmail/$HOST`
}`test -e /home/vmail/$HOST/$USER`
if ( $RETURNCODE != 0 )
{
`/usr/bin/maildirmake++ /home/vmail/$HOST/$USER`
`/bin/chmod -R 0700 /home/vmail/$HOST`
}`test -e /home/vmail/autorespond/$HOST`
if ( $RETURNCODE != 0 )
{
`/bin/mkdir /home/vmail/autorespond/$HOST`
}`test -e /home/vmail/autorespond/$HOST/$USER`
if ( $RETURNCODE != 0 )
{
`/bin/mkdir /home/vmail/autorespond/$HOST/$USER`
`/bin/chmod -R 0777 /home/vmail/autorespond/$HOST`
}#
# test for vacation file, if it exists, send autoresponse
#
`test -f /home/vmail/autorespond/$HOST/$USER/vacation.txt`
#`/usr/bin/logger $RETURNCODE`
if ( $RETURNCODE == 0 )
{
# test for vacation message subject, use it if found
#
`test -f /home/vmail/autorespond/$HOST/$USER/vacation_subject.txt`
if ($RETURNCODE==0)
{
SUBJECT=`cat /home/vmail/autorespond/$HOST/$USER/vacation_subject.txt`
`/usr/bin/logger -pmail.info $SENDER`
cc "| mailbot -f$SENDER -t /home/vmail/autorespond/$HOST/$USER/vacation.txt -A 'From: [EMAIL PROTECTED]' -A 'Subject: $SUBJECT' /usr/sbin/sendmail -f '' $SEND
ER"
# otherwise, regular "Re:" syntax for subject is automatic
#
}
else
{cc "| mailbot -f$SENDER -t /home/vmail/autorespond/$HOST/$USER/vacation.txt -A 'From: $LOGNAME' /usr/sbin/sendmail -f '' $SENDER"
}
# test for any cc addresses, forward to those addresses if present
#
`test -f /home/vmail/autorespond/$HOST/$USER/vacation_cc_addresses.txt`
if ($RETURNCODE==0)
{
# grab cc addresses
#
CCADDRESSES=`cat /home/vmail/autorespond/$HOST/$USER/vacation_cc_addresses.txt`
# do we need to keep a copy of messages in this account or not?
#
`test -f /home/vmail/autorespond/$HOST/$USER/vacation_keep_messages.txt`
if ($RETURNCODE==0)
{
cc "! -f \"$FROM\" $CCADDRESSES"
}
else
{
to "! -f \"$FROM\" $CCADDRESSES"
}
}
}
# # Check that user has his own maildrop include, # if not available, check if $DEFAULT is set # (newer maildrop get's that from the DB and updates # it) and deliver or fail temporarily if not available #
`test -f /home/vmail/.mailfilters/$LOGNAME`
if ( $RETURNCODE == 0 )
{
include "/home/vmail/.mailfilters/$LOGNAME"
}
else
{
if ( "$DEFAULT" ne "" )
{
to "$DEFAULT"
}
else
{
EXITCODE=75
exit
}
}------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click _______________________________________________ courier-users mailing list [EMAIL PROTECTED] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
