Hi,
I found a solution to produce a valid configuration file test.cf from
m4 macros. First I created the m4 macro file test.mc with my
modifications:
$ cat test.mc:
include(cf/m4/cf.m4)
OSTYPE(linux)
define(`ALIAS_FILE',`/etc/mail/aliases')
define(`SMART_HOST',`my.smarthost.com')
GENERICS_DOMAIN_FILE(`/etc/mail/genericsdomain')
FEATURE(masquerade_envelope)
FEATURE(genericstable, `hash -o /etc/mail/genericstable')
MAILER(local)
MAILER(smtp)
Then I used sed to reflect the /opt/etc and /opt/var directories:
$ cat sed.sh:
#!/bin/sh
sed -e 's/\/etc/\/opt\/etc/' -e 's/\/var/\/opt\/var/' -e 's/usr/opt/'
-e 's/\/opt\/etc\/hosts/\/etc\/hosts/' $1 > $2
$ sed.sh test.mc test.cf
And voila! here is the valid configuration file for the optware
sendmail package created using m4 macros.
Alexander
On 19 August 2010 11:19, Alexander Pohl <a.h.pohl@gmail.com> wrote:
> Hi,
>
> How to I generate a custom sendmail.cf file without editing the file
> directly? From what I understand is that the sendmail.cf file is
> generated during the build precess by the site-config.m4 macro and the
> patch config.patch. The sendmail package build process does not make
> use of m4 macros. I would like to use the modifications already
> applied in sendmail.cf, ie. custom path to config files in /opt, as a
> starting point for my own configuration. In particular I want to add
> from an to address rewriting and use m4 macros described at
> http://tldp.org/HOWTO/Sendmail-Address-Rewrite.html.
>
> I am a total sendmail beginner and don't know how to edit sendmail.cf
> directly. I also tried other simpler MTA's, but it looks like sendmail
> is the best option as I don't need to run it as a daemon just to send
> a couple of messages to a smarthost and it has all the address
> rewriting capabilities I need for backuppc which e.g. ssmtp lacks.
>
> Thanks for any help.
> Alexander
>
Thursday, August 19, 2010
[nslu2-linux] Re: nslu2 optware sendmail configuration
__._,_.___
.
__,_._,___
No comments:
Post a Comment