[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?



Hello Joe.

The script is doing the following:

1. Listing the /home/sites/ directory content.
2. Ignoring the www part at the beginning of site name
3. Grabbing the column or field no.2 and no.3

column no.2 is the site name i.e. mysite
column no.3 is the .com or .net 

since .uk domains consists of 4 parts (i.e. www.domain.co.uk), you need to make the script 
garb the column no.4 which is .uk

ok here is the modified script that will work for all tlds and .uk:

ls /home/sites/|awk -F '.' ' {if ($0 ~ /www/) {print $2"."$3.$4}}' >> /etc/mail/local-host-names

same with the other script (edit the print argument to include column no.4).

aljuhani@xxxxxxxxx


==Original Message==

> 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