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

Re: [cobalt-users] parked domains and email



Whops you are right sendmail.cw

Heres a bit of bash to do it ( If it fries your machine its not my fault :-)
I have used it for 6 months though
If somone makes it better that would be great Like a bit more checking




#!/bin/bash
          echo Add Mail user to sendmail
OPTIONS="Add Restart Quit"
           select opt in $OPTIONS; do
               if [ "$opt" = "Quit" ]; then
                echo done
                exit
               elif [ "$opt" = "Add" ]; then
                echo Please, enter domain name
                read DOMAIN
                echo Please, enter mail box name
                read MAILBOX
                echo "Domain Name $DOMAIN"
                echo "Mail Box Name $MAILBOX"
                echo "Ok y n"
                read OK
                if [ "$OK" = "y" ]; then

                SENDM=`grep $DOMAIN /etc/sendmail.cw -c`
                VIRTM=`grep $DOMAIN /etc/virtusertable -c`
                #VSDTM=`grep $MAILBOX /etc/virtusertable -c`
                VSM=$[$SENDM+$VIRTM]
                        if [ "$VSM" = "0" ]; then
                                cp /etc/sendmail.cw /etc/sendmail.cw.old
                                cp /etc/virtusertable /etc/virtusertable.old
                                echo $DOMAIN >> /etc/sendmail.cw
echo @$DOMAIN $MAILBOX >> /etc/virtusertable
                                echo Mail User Added
                        else
                                clear
                                echo Not added Exists
                        fi
                else
                        clear
                        echo Not added
                fi
                elif [ "$opt" = "Restart" ]; then
                makemap hash /etc/virtusertable < /etc/virtusertable
                /etc/rc.d/init.d/sendmail restart
                echo Virtuser table added
                echo Sendmail restarted
               else
                clear
                echo bad option
               fi
           done






At 16:10 9/12/00 -0500, you wrote:
George.. a genius.. but one difference.. I found the domains needed to be aded to the /etc/sendmail/cw not the .cf file..
I'm on a raq3i if that means anything in the setup and files..
it worked..thanks so very much.

Debbie

At 08:48 AM 12/10/00 +1300, Craig St George said:
>I have done this a few times
>add MX records to pint the parked domains to your mail server
>
>then in sendmail.cf file add the domains
>eg edit that /etc/sendmail.cf
>add
>domain.com
>
>then edit the virtual user table
>/etc/virtusertable
>add a catch all to send it to one of there POP accounts at the section that
>says at custom edits here
>like
>@domain.com user
>
>then rebuild the table
>and then restart sendmail
>
>that should work
>
>
>
>
>
>
>At 10:27 9/12/00 -0500, you wrote:
>>I have several vsites that have parked domains.
>>each of the parked ones have only 2 A records:
>>domain.com --> IP#
>>www.domain.com --> IP#
>>
>>each has been added to the
>><VIRTUAL HOST>
>>section of the appropriate master domain:
>>ServerAlias www.domain.com domain.com
>>
>>This works just dandy..
>>
>>Question is mail.. I tested today and is someone emails the parked domain
>>it bounces as relaying denied, user unknown.
>>
>>Do I need to add MX records for each of the parked domains pointing to
>>it's master domain.com??
>>
>>
>>
>>Regards,
>>Debbie  ^v^   ///\o/\\\    ^v^  Webmaster - System Admin
>>webmaster@xxxxxxxxxxxxxx (AIM NailGdsss  ICQ 354179)
>>WWWeb Services, Ronkonkoma, NY
>>877-669-7953 - voicemail/fax
>>BeautyTech / SalonMart
>>http://beautytech.com/   http://salonmart.com
>>
>