Fixed a problem with broken tolower function in maildrop when compiled with some specific gcc settings by forcing lowercase addresses in master.cf and adding a workaround in case that tolower returns a empty result.
| | |
| | | $content = rf($configfile); |
| | | // if postfix package is from fedora or centios main repo |
| | | $content = str_replace('# flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}', |
| | | ' flags=R user='.$cf['vmail_username'].' argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}', |
| | | ' flags=DRhu user='.$cf['vmail_username'].' argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}', |
| | | $content); |
| | | |
| | | // If postfix package is from centos plus repo |
| | | $content = str_replace('# flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}', |
| | | ' flags=R user='.$cf['vmail_username'].' argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}', |
| | | ' flags=DRhu user='.$cf['vmail_username'].' argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}', |
| | | $content); |
| | | |
| | | $content = str_replace(' flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}', |
| | | ' flags=R user='.$cf['vmail_username'].' argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}', |
| | | ' flags=DRhu user='.$cf['vmail_username'].' argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}', |
| | | $content); |
| | | |
| | | |
| | |
| | | $content = rf($configfile); |
| | | |
| | | $content = str_replace(' flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}', |
| | | ' flags=R user='.$cf['vmail_username'].' argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}', |
| | | ' flags=DRhu user='.$cf['vmail_username'].' argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}', |
| | | $content); |
| | | |
| | | $content = str_replace(' flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}', |
| | | ' flags=R user='.$cf['vmail_username'].' argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}', |
| | | ' flags=DRhu user='.$cf['vmail_username'].' argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}', |
| | | $content); |
| | | |
| | | wf($configfile, $content); |
| | |
| | | $configfile = $config_dir.'/master.cf'; |
| | | $content = rf($configfile); |
| | | $content = str_replace('flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}', |
| | | 'flags=R user='.$cf['vmail_username'].' argv=/usr/bin/maildrop -d '.$cf['vmail_username'].' ${extension} ${recipient} ${user} ${nexthop} ${sender}', |
| | | 'flags=DRhu user='.$cf['vmail_username'].' argv=/usr/bin/maildrop -d '.$cf['vmail_username'].' ${extension} ${recipient} ${user} ${nexthop} ${sender}', |
| | | $content); |
| | | wf($configfile, $content); |
| | | |
| | |
| | | SENDER="$5" |
| | | DEFAULT="{dist_postfix_vmail_mailbox_base}/$HOST/$USER/." |
| | | |
| | | # Workaround for broken tolower function in some current fedora releases |
| | | |
| | | if(!$USER) |
| | | { |
| | | USER=$3 |
| | | } |
| | | if(!$HOST) |
| | | { |
| | | HOST=$4 |
| | | } |
| | | |
| | | if ( "$EXTENSION" ne "" ) |
| | | { |
| | | DELIMITER="+" |