Re: mj_create_list fails with postfix

Daniel Liston <[email protected]> Fri, 03 Oct 2008 22:41:51 -0500
Newsgroups gmane.mail.majordomo.general
Message-ID <[email protected]>
Hi Duncan,

$sendmail_command is defined in the majordomo.cf file.  Is yours pointed to
postfix?  Also of interest are the $mailer definition and comments.

# $sendmail_command -- Pathname to the sendmail program
#                      usually /usr/lib/sendmail, but some newer BSD systems
#                      seem to prefer /usr/sbin/sendmail
#
# $sendmail_command = "/usr/lib/sendmail";
$sendmail_command = "/usr/sbin/sendmail";

# $mailer -- What program and args do I use to send mail to the list?
# $bounce_mailer -- What is used to send mail anywhere else?
# The variables $to, $from, $subject, and $sender can be interpolated into
# this command line.  Note, however, that the $to, $from, and $subject
# variables may be provided by the person sending mail, and much mischief
# can be had by playing with this variable.  It is perfectly safe to use
# $sender, but the others are insecure.
#
# Sendmail option -oi:  Do not take a . on a line by itself as the message
#                       terminator.
# Sendmail option -oee: Force sendmail to exit with a zero exit status if
#                       if it's not going to give useful information.
#
$mailer = "$sendmail_command -oi -oee -f\$sender";
$bounce_mailer = "$sendmail_command -oi -oee -f\$sender -t";

# You can special case the mailer used to deliver outbound mail as follows:
#
# To use TLB and use no outgoing alias:
# if ($main'program_name eq 'mj_resend' && $opt_l eq 'test-list') {
#   $mailer = "/usr/local/majordomo/tlb /usr/local/lists/${opt_l}.tlb";
# }
#
# To use a different Sendmail queue for this list's mail:
# if ($main'program_name eq 'mj_resend' && $opt_l eq 'test-list') {
#   $mailer = "$sendmail_command -oQ /var/spool/listq -f\$sender";
# }

Lastly, are you using the create list function of majorcool with majorcool,
or are you trying to use it as in independent application?  If the latter,
you might be interested in trying out a script I wrote a few years back at;

    ftp://ftp.ccsf.org/majordomo-contrib/listadd5.pl.gz

Dan Liston

Duncan Cunningham wrote:
> Hi,
> 
> I am trying to get the mj_create_list script from majorcool working with 
> majordomo.  When I try to create a list through majorcool using the 
> script, it errors out saying: Checking for existing aliases... address 
> '$list' already exists.  It doesn't matter what I call the list, it will 
> fail.  I did some poking around in the script and the following line 
> causes the failure.
> 
> &squawk("address '$list' already exists")
>                unless system("$sendmail_command -bv $list >/dev/null");
> 
> We are using postfix for mailing and from what I can tell, postfix will 
> return 0 whether $list exists or not, causing the squawk command to 
> always execute.  Anyone have any ideas of how I can get this working 
> with postfix?
> 
> Thanks,
> Duncan Cunningham
>