| Simon Kidger on Mon, 5 Feb 2001 12:18:51 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: GLUG: Sendmail PID's |
Hi Darren,
> how do I get all local mail not to be queued? But other
> mail to wait for the dialup?
In your sendmail.cf file, add:
O HoldExpensive=True
then further down in the mailer section, add the 'e' option to
Mesmtp: eg:
Before: Mesmtp, P=[IPC], F=mDFMuXa, S=11/31, R=21, E=\r\n, L=990
After: Mesmtp, P=[IPC], F=mDFMuXae, S=11/31, R=21, E=\r\n, L=990
^
The 'e' option flags the esmtp mailer as "Expensive" (ie. queue mails to
be delivered via ESMTP). The *absence* of an 'e' flag in the local
mailer definition (Mlocal) will tell sendmail not to queue mail to be
handled by the local mailer. You may actually need to add this option to
all non-local mailers too, assuming that sendmail will not deliver everything
remote using esmtp.
Then restart sendmail.
To rather do this via m4 and not change the .cf file directly, read
/usr/lib/sendmail-cf/README and look for "SMTP_MAILER_FLAGS". I can't
remember the correct syntax for this option in an sendmail.mc file, but
it may be something like: define(`SMTP_MAILER_FLAGS',`e'). (The last time
I did this I *think* this option specified *extra* flags other than the
default).
Give that a go + see if it does what you want.
As for the 2nd question, if it works from shell but not from cron,
then start looking at wether or not it is not an environment/path
problem. I've sorted out a lot of problems with cron by making sure
I specify full pathnames in the actual script executing. If it's not
this, then put extensive checkpoints in the ppp-on script (as well as
the chat script it calls), writing output to a file. This will help
you narrow down where exactly it bombs out.
>From pppd's man page:
EXIT STATUS
2 An error was detected in processing the options given, such as two
mutually exclusive options being used.
Good luck,
Cheers
Simon Kidger
address : SevenC, PO Box 4720, Rivonia, 2128, South Africa
email : simon@xxxxxxxxxxxx
site : www.sevenc.co.za
tel : +27 11 805-7243
fax : +27 11 805-7239
SEVENC COMPUTING
Linux, Linux, Linux
Technical & Internet software development
On Mon, 5 Feb 2001, Darren Harris wrote:
> I have a similar problem,
> how do I get all local mail not to be queued? But other
> mail to wait for the dialup?
>
> Another problem, I set up a cron job to dialup, to send and
> receive mail. If I run the script from root, it works, but when
> cron runs it, it dial up and then 17s later is killed by a signal 2
> ppp[4772]: Terminating on Signal 2
>
> my script is:
> /usr/bin/fetchmail -q
> /usr/bin/ppp-on
> sleep 45
> /usr/sbin/sendmail -q
> /usr/bin/fetchmail
> /usr/bin/ppp-off
>
> can anyone tell me what and where signal 2 is / comes from?
>
> Darren