[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] [RaQ4] Was (Monkey Wrench Goes Nowhere) problem but now email problem?



> This is the fix I have found sometime before on another Cobalt Website:
>
> This will happen if your admin pages die and you need to replace them with
the
> sitefix script. You will need to go through and replace all the email
server
> aliases on all your sites.
>
> If you have a lot of sites this could take a while. So you probably want
to
> make use of the fact that this setting isn't stored in the pg database but
is
> taken from the system files.
> Basically you need to add each domain name to /etc/mail/local-host-names
and
> the configuration for sending mail for that to the right place in
> /etc/mail/virtuser.
>
> Adding the domains to local-host-names is easy. Use something like:
> ls /home/sites/|awk -F '.' ' {if ($0 ~ /www/) {print $2"."$3}}' >>
> /etc/mail/local-host-names
>
> Adding the configuration to the virtusertable is a little more involved
(not
> much). You need to have the list in the form of:
> @domain.dom %1@xxxxxxxxxxxxxx
> So generate a list using something like:
> ls /home/sites/ |awk -F '.' ' {if ($0 ~ /www/) {print
> "@"$2"."$3"\t%1@"$2"."$3}}' > /tmp/newvirt
>
> This will create a file with what you need. And you just need to add it
into
> the virtusertable file underneath the comment which says:
> # accept-email-at-domain routes
> You can do this in vi by going to the right place in the file and using:
> :r /tmp/newvirt
>
> Then restart sendmail (/etc/rc.d/init.d/sendmail restart). This will save
you
> a lot of time if you have 150 sites or so.

Thanks for the help, when I use the script it misses out .uk part of
domain.co.uk It's fine for .com etc but not for others, how would I modify
it please?

Regards,

Joe