LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-21-2012, 02:48 AM   #1
sanjay87
Member
 
Registered: Oct 2011
Posts: 164

Rep: Reputation: Disabled
How to configure cache on sendmail in ubuntu 10.04


Hi
Currently im trying to configure cache for my domain terminal.com .Any unknown account of terminal.com domain mail to forward to catchall@terminal.com

Any help regarding catchall configuration
 
Old 04-21-2012, 03:40 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

You need to add in /etc/mail/virtusertable all existent accounts in that domain first and then a wildcard email address:
Code:
user1@terminal.com
...
userX@terminal.com
@terminal.com catchall@terminal.com
Then rebuild the virtusertable:
Code:
makemap hash /etc/mail/virtusertable < /etc/mail/virtusertable
Regards
 
Old 04-21-2012, 05:15 AM   #3
sanjay87
Member
 
Registered: Oct 2011
Posts: 164

Original Poster
Rep: Reputation: Disabled
Hi bathory ,
thanks for ur reply

These the link i had followed for configuring sendmail

http://www.shootthiscomputer.com/edu/sendmailubuntu/



But im using ubuntu distro 10.04lucid
#apt-get install sendmail


But i could int find any virtusertable in my /etc/mail folder


root@dinesh-desktop:~# clear

root@dinesh-desktop:~# cd /etc/mail
root@dinesh-desktop:/etc/mail# ls
access local-host-names sendmail.cf.old submit.cf
access.db m4 sendmail.conf submit.cf.old
address.resolve Makefile sendmail.mc submit.mc
aliases peers service.switch tls
aliases.db sasl service.switch-nodns trusted-users
databases sendmail.cf smrsh
helpfile sendmail.cf.errors spamassassin
root@dinesh-desktop:/etc/mail#

vi /usr/share/sendmail/examples/db/virtusertable

# Address rewrites for incomming mail
# user@realdomain (must be in $w) localuser (may be an alias)
# info@foo.com foo-info
# info@bar.com bar-info
# @baz.org jane@elsewhere.net
# @foo.org %1@elsewhere.com
# @bar.org error:nouser User unknown
@terminal.com catchall@terminal.com


Apr 21 15:32:35 dinesh-desktop sm-mta[11729]: q3L9jbpJ009947: to=<aer@terminal.com>, ctladdr=<root@localhost.localdomain> (0/0), delay=00:16:58, xdelay=00:00:00, mailer=esmtp, pri=300355, relay=terminal.com., dsn=4.0.0, stat=Deferred: Connection timed out with terminal.com.
Apr 21 15:42:35 dinesh-desktop sm-mta[12020]: q3L9hcRj009793: to=<s@terminal.com>, ctladdr=<root@localhost.localdomain> (0/0), delay=00:28:57, xdelay=00:00:42, mailer=esmtp, pri=390350, relay=terminal.com. [203.27.227.85], dsn=4.0.0, stat=Deferred: Connection timed out with terminal.com.
Apr 21 15:42:35 dinesh-desktop sm-mta[12020]: q3L9jbpJ009947: to=<aer@terminal.com>, ctladdr=<root@localhost.localdomain> (0/0), delay=00:26:58, xdelay=00:00:00, mailer=esmtp, pri=390355, relay=terminal.com., dsn=4.0.0, stat=Deferred: Connection timed out with terminal.com.~
~
~

Last edited by sanjay87; 04-21-2012 at 06:15 AM.
 
Old 04-21-2012, 07:57 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

If it doesn't exist, you can create it, or copy the example /usr/share/sendmail/examples/db/virtusertable.
And don't forget to recreate the virtusertable database, or it's not going to work. So after editing /etc/mail/virtusertable, run:
Code:
makemap hash /etc/mail/virtusertable < /etc/mail/virtusertable
Regards
 
Old 04-23-2012, 11:08 AM   #5
sanjay87
Member
 
Registered: Oct 2011
Posts: 164

Original Poster
Rep: Reputation: Disabled
Hi
Sill catch is int working for me .Another other configuration i have to modify to make catch working .

root@dinesh-desktop:~# cat /etc/mail/virtusertable
# Address rewrites for incomming mail
# user@realdomain (must be in $w) localuser (may be an alias)
# info@foo.com foo-info
# info@bar.com bar-info
# @baz.org jane@elsewhere.net
# @foo.org %1@elsewhere.com
# @bar.org error:nouser User unknown
@beetel.etl.com catchall@beetel.etl.com


root@dinesh-desktop:~# service sendmail restart
* Restarting Mail Transport Agent (MTA) sendmail [ OK ]
Quote:
root@dinesh-desktop:~# makemap hash /etc/mail/virtusertable < /etc/mail/virtusertable
root@dinesh-desktop:~# service sendmail restart * Restarting Mail Transport Agent (MTA) sendmail [ OK ]
Quote:
root@dinesh-desktop:~# echo mail | mail -s CATCHALL "designer@beetel.etl.com"
Quote:
root@dinesh-desktop:~# tail -f /var/log/mail.log
Apr 23 21:34:18 dinesh-desktop sendmail[6075]: q3NG4I0V006075: to=<designer@beetel.etl.com>, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30089, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q3NG4INd006076 Message accepted for delivery)
Apr 23 21:34:18 dinesh-desktop sm-mta[6077]: q3NG4INd006076: to=<designer@beetel.etl.com>, ctladdr=<root@beetel.etl.com> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30580, dsn=2.0.0, stat=Sent
^C
root@dinesh-desktop:~# su - designer
No directory, logging in with HOME=/
$ bash
designer@beetel:/$ mail
"/var/mail/designer": 15 messages 1 new 14 unread
U 1 root Mon Apr 23 18:47 18/659 TEST
U 2 root Mon Apr 23 18:47 17/633 test
U 3 root Mon Apr 23 18:47 17/635 Mailer
U 4 root Mon Apr 23 18:48 17/608 mailers
U 5 root Mon Apr 23 18:49 17/607 Sanjay
U 6 root Mon Apr 23 18:59 17/605 test
U 7 root Mon Apr 23 19:02 17/607 test
U 8 root Mon Apr 23 19:02 17/611 saravana
U 9 root Mon Apr 23 19:10 17/607 Tester
U 10 root Mon Apr 23 19:18 17/606 Mail
U 11 root Mon Apr 23 19:27 17/610 testmail
U 12 root Mon Apr 23 20:29 17/606 Mail
U 13 root Mon Apr 23 21:27 17/611 mail
U 14 root Mon Apr 23 21:31 17/612 mailers
>N 15 root Mon Apr 23 21:34 15/590 CATCHALL
? ^CInterrupt
?
Held 15 messages in /var/mail/designer
designer@beetel:/$ exit
you have mail
$ ^X-su: : not found
$

Quote:
root@dinesh-desktop:~# su - catchall
No directory, logging in with HOME=/
$ bash
catchall@beetel:/$ mail
No mail for catchall
catchall@beetel:/$
 
Old 04-23-2012, 01:06 PM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Huh, what is the output of the following:
Code:
sendmail -bv designer@beetel.etl.com
sendmail -bv foo@beetel.etl.com
BTW there is no need to restart sendmail if you rebuild the virtusertable database.
 
Old 04-24-2012, 03:59 AM   #7
sanjay87
Member
 
Registered: Oct 2011
Posts: 164

Original Poster
Rep: Reputation: Disabled
Quote:
root@dinesh-desktop:~# sendmail -bv designer@beetel.etl.com
designer@beetel.etl.com... deliverable: mailer local, user designer
Quote:
root@dinesh-desktop:~# sendmail -bv foo@beetel.etl.com
foo@beetel.etl.com... User unknown
root@dinesh-desktop:~# sendmail -bv catchall@beetel.etl.com
catchall@beetel.etl.com... deliverable: mailer local, user catchall

Quote:
root@dinesh-desktop:~# echo mail | mail -s hello "designer@beetel.etl.com"
Quote:
root@dinesh-desktop:~# sendmail -bv catchall@beetel.etl.com
catchall@beetel.etl.com... deliverable: mailer local, user catchall
 
Old 04-24-2012, 04:36 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
root@dinesh-desktop:~# sendmail -bv designer@beetel.etl.com
designer@beetel.etl.com... deliverable: mailer local, user designer
From the above it's obvious that this is a local user, but if virtusertable was woarking mail for that user should also go to the catchall address.

Quote:
root@dinesh-desktop:~# sendmail -bv foo@beetel.etl.com
foo@beetel.etl.com... User unknown
And from this, that the catchall address is not working. Maybe for ubuntu you have to run just "make" instead of "makemap ..." as it's stated here
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How can i configure sendmail in ubuntu 10.04 jsaravana87 Linux - Server 1 09-03-2011 04:20 AM
How can configure dns cache name server with slave domain?? Gran_Maestre Linux - Server 1 07-06-2010 06:18 AM
configure sendmail sumer Linux - Newbie 1 03-29-2009 11:24 AM
Need help to configure Sendmail athreyavc Linux - Networking 4 03-29-2006 06:41 AM
configure sendmail Red Squirrel Linux - Software 5 04-12-2004 04:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration