LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   /etc/mail/virtusertable Issue?? (https://www.linuxquestions.org/questions/linux-newbie-8/etc-mail-virtusertable-issue-759398/)

your_shadow03 10-03-2009 06:35 AM

/etc/mail/virtusertable Issue??
 
I have sendmail setup on Fedora 9 Machine. I am able to send mail from one user to another without any issue.What I am facing issue is with virtusertable.

I edited the file /etc/mail/virtusertable as:

Code:


finance@intinfra.com  itconsultant
@intinfra.com          itconsultant

I ran #make -C /etc/mail
#service sendmail restart

Then I added this line under /etc/aliases:

itconsultant: <tab> azit

Azit is a user existing in the system.

Tried running newaliases and restarted the server.
And Tried sending mail through a user "sender" to recepient as:
#echo "Hello"| mail -v -s "I need a help" finance@intinfra.com

Checked with user "azit" mailbox but no thing is there.

Tux-Slack 10-03-2009 09:58 AM

Did you run newaliases after editing /etc/aliases?
And did you add/uncomment line:
FEATURE(virtusertable, `hash -o /etc/mail/virtusertable')dnl
in sendmail.mc?

your_shadow03 10-03-2009 10:00 AM

Yes..I ran that.

your_shadow03 10-03-2009 10:02 AM

Does

#makemap hash /etc/mail/virtusertable.db < /etc/mail/virtusertable
and
#cd /etc/mail
#make

has same effect?

Tux-Slack 10-03-2009 10:04 AM

No, not really actually, if you don't put it in the sendmail.mc, it doesn't matter how much you makemap hash the file, the daemon will not read it untill the line is in the sendmail.mc and rebuilt.

your_shadow03 10-03-2009 10:14 AM

I have been trying from couple of hours with virtusertable.

I did checked with /etc/mail/sendmail.mc
and found the entry is there for:

Code:

FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable.db')dnl
And has followed normal steps of making entry in /etc/mail/virtusertable as:

finance@intinfra.com itconsultant

#cd /etc/mail
#make

Then , Edited /etc/mail/access

itconsultant azit

Ran :

newaliases
service sendmail restart

am I missing anything?
Just was in Doubt if virtuser act for local domain or for different Domain. If thats not the fact then why its not working.
/var/log/maillog dont too say anything other than Message Received..!!

I will appreciate if you help me setting up for the same.
Or you can send me steps by trying out in your own Linux Machine.

Tux-Slack 10-03-2009 10:20 AM

Then , Edited /etc/mail/access
Erm...why did you edit this line?
In your first post you mentioned the right procedure, edit /etc/aliases, add:
alias: _tab_ user
save and run newaliases. And then it should work.
But one thing, why do you transfer your "finance" mail address over to itconsultant which is an alias for some user? Why not transfer it over directly to the user? I'm not sure that virtusertable works for aliases. Or maybe add there:
finance@intinfra.org itconsultant@intinfra.org

And another thing, virtuser table is used for different domains, say that you have domain1.com and domain2.com and you want mail info@domain1.com be send to user A and mail sent to info@domaion2.com to user B, then you use virtusertable.
But if you use one domain only, then simply add another line in aliases like:
finance: _tab_ itconsultant
or
finance: _tab_ user
o

your_shadow03 10-03-2009 10:24 AM

I did tried it first time but it dint seem to work.
let me ignore the /etc/mail/access and make it directly.
Just Gimme a Minute.

your_shadow03 10-03-2009 10:30 AM

All I tried is this time:

File: /etc/mail/virtusertable
Code:

finance@intinfra.com        <tab>  azit
File: /etc/mail/access
Code:

#itconsultant <tab>  azit
#newaliases --<<< for /etc/aliases

#cd /etc/mail
#make --<< For Virtusertable.db

#service sendmail restart

Tried out sending mail from user machine "sender" as:
$echo "hello" | mail -v -s "I need help" finance@intinfra.com

No...!!!
[ajeet ~]$ mail
no mail...

your_shadow03 10-03-2009 11:40 AM

Yeah !! Thats Done.
I followed up with this link : http://www.linuxquestions.org/questi...pients-419158/

Here is the working Virtusertable Configuration:


File:/etc/mail/virtusertable

Code:


finance@intinfra.com  finance

#cd /etc/mail
#makemap hash virtusertable.db < virtusertable
#service sendmail restart

File: /etc/mail/access

Code:

finance:      azit,abhi,receiver
#newaliases
#service sendmail restart

Try out sending mail to finance@groupinfra.com
And Found mail to all the three Users:

DOne !!! thanks Tux.

your_shadow03 10-03-2009 11:46 AM

I have too added every EPISODE @ http://linuxhunt.blogspot.com

Hopeit would be helpful for Sendmail Freakers!!!

your_shadow03 10-04-2009 06:07 AM

Hey..Tux..

I think I may be doing something wrong.
All I made earlier entry and it worked !! But to my surprise thats taking from /etc/aliases and nothing from /etc/mail/virtusertable I guess.

When I am sending mail as:
#echo "hello" | mail -v -s "hi" finance
its working becoz /etc/aliases is coming into picture.
But virtusertable still remains missing at this contxt.

anyone who can help me knowing how virtusertable could be configured properly.
Totally Frustrated !!
Help !!

Tux-Slack 10-04-2009 01:35 PM

I already gave you that answer why not. :)
You need more domains configured before it will "listen" to virtusertable.
http://patriot.net/~scoile/isp-redha.../virtusertable


All times are GMT -5. The time now is 07:40 PM.