

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
2 messages in net.sourceforge.lists.courier-users[courier-users] Problems with Maildro...| From | Sent On | Attachments |
|---|---|---|
| Bruce Sackett | Aug 27, 2004 8:50 am | |
| Sam Varshavchik | Aug 27, 2004 3:39 pm |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | [courier-users] Problems with Maildrop and multiple addresses (POSTFIX) | Actions... |
|---|---|---|
| From: | Bruce Sackett (bru...@oec-sys.com) | |
| Date: | Aug 27, 2004 8:50:59 am | |
| List: | net.sourceforge.lists.courier-users | |
I've used the excellent Postfix+MySQL+Courier-IMAP+Amavis howto by Martin List-Peterson to set up and configure my new postfix mail system, and it's been terrific. I'm really happy with the switch-over so far from qmail, and other than O/S problems that have recently been fixed, it's been fun.
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} ${user}@${nexthop} ${extension} ${user} ${nexthop} ${sender}
HOWTO SUGGESTED LINES: (NOT USED) maildrop unix - n n - - pipe flags=R user=vmail argv=/usr/bin/maildrop -d ${user}@${nexthop} ${extension} ${recipient} ${user} ${nexthop} ${sender}
LOG INFO:
THIS ONE WORKED - ONE ADDRESS: (SEE .MAILFILTER SCRIPT BELOW FOR LOG PATTERN) MAILFILTER::gr...@oec-sys.com:greg:oec-sys.com:bo...@oec-sys.com:/home/vmail/oec-sys.com/greg/.:gr...@oec-sys.com:vmail
THIS ONE FAILED - MULTIPLE ADDR. MAILFILTER: gr...@oec-sys.com:::bo...@oec-sys.com:gr...@oec-sys.com:/home/vmail/bo...@oec-sys.com//.:bo...@oec-sys.com: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: $USER@$HOST' -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 } }







