Sendmail Config Question


 
Thread Tools Search this Thread
Operating Systems Solaris Sendmail Config Question
# 1  
Old 08-22-2006
Sendmail Config Question

Hi,

I have sendmail configured on my SOLARIS 10 server. But right now, it uses
by default root@mysun.localdomain.

I wanted to change the default from field to a outside ISP address, so that I can send email to any outside internet email address without changing the FROM field...... because right now i can do the following to override the default from field

sendmail -f my@outside.email.address friends@email.address

This works fine. So can you please guide me how to get sendmail to always send emails to anyone using from field as "my@outside.email.address "

thanks
rohit
# 2  
Old 08-28-2006
can someone please be kind enough to help me out here.

I'm a newbie in Unix and i have searched many forums but haven't seen a firm solution for this and I wudn't want to screw up the sendmail config.

Please help.

regards
rohit
# 3  
Old 08-28-2006
The problem is that sendmail can be rather complex. You might want to check www.sendmail.org and look up the masquerade configuration options. I set up my openbsd sendmail server to masquerade and the docs are pretty clear.

Carl
# 4  
Old 08-28-2006
For example, the mc files are in /usr/share/sendmail (there's a nice readme there too). Under cf I have an openbsd-proto.mc file which is what's used to manage my configuration. The enabled options are:

MASQUERADE_AS(`schelin.org')dnl
FEATURE(masquerade_envelope)dnl
FEATURE(masquerade_entire_domain)dnl
FEATURE(local_no_masquerade)dnl

I also have these enabled:

define(`confCW_FILE', `-o MAIL_SETTINGS_DIR`'local-host-names')dnl
FEATURE(genericstable, `hash -o /etc/mail/genericstable')dnl

Which lets me assign specific domains to specific accounts on my system. That way my personal account's e-mail is different than my business account.

/etc/mail/local-host-names holds the two domains I have and /etc/mail/genericstable holds the account name -> account name (at) FQDN and account name (at) localhost -> account name (at) FQDN.

pete -> pete (at) schelin (dot) org for example.

Carl
# 5  
Old 08-29-2006
hi ,

thanks for your reply. I have tried to read the sendmail.org doco but seems a bit confusing for a newbie like me.

Also, the "dnl" word that you used after those commands, does this activate the command on *.mc file or does it comment it out ? Whatz the purpose of it ?

I just want all emails gng out from my sun server to have a specific outside email address - my ISP's email id. Since I have a local domain on my sun server, under the local-host-names i just have "mysun.localdomain". I tried to use the genericstable and created its db file using makemap command. The genericstable contains
root@mysun.localdomain <tab space> my.isp's.email.id

In the sendmail.mc file (/etc/mail/cf/cf) i have
Code:
divert(-1)
#
# Copyright (c) 1983 Eric P. Allman
# Copyright (c) 1988, 1993
#	The Regents of the University of California.  All rights reserved.
#
# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# ident	"@(#)sendmail.mc	1.11	04/06/21 SMI"
#
#  This is a configuration file for SunOS 5.8 (a.k.a. Solaris 8) and later
#  subsidiary machines.  It has support for local and SMTP mail.  The
#  confFALLBACK_SMARTHOST macro is enabled, which means that messages will
#  be sent to that host (which is set to mailhost.$m [$m is the local domain])
#  if MX records are unavailable.  A short-cut rule is also defined, which
#  says if the recipient host is in the local domain, send to it directly
#  instead of the smart host.
#
#  If you want to customize this further, copy it to a name appropriate
#  for your environment and do the modifications there.
#

divert(0)dnl
VERSIONID(`@(#)sendmail.mc	1.11 (Sun) 06/21/04')
OSTYPE(`solaris8')dnl
DOMAIN(`solaris-generic')dnl
define(`confFALLBACK_SMARTHOST', `mailhost$?m.$m$.')dnl

FEATURE(generics_entire_domain)
FEATURE(genericstable, `hash -o /etc/mail/genericstable')
GENERICS_DOMAIN(`localdomain')
MAILER(`local')dnl
MAILER(`smtp')dnl

R$* < @ $* .$m. > $*	$#esmtp $@ $2.$m $: $1 < @ $2.$m. > $3
LOCAL_NET_CONFIG

Once I compiled the sendmail.cf from the above file, it was placed into /etc/mail/. Anyways after compilation when I tried to start sendmail , it wouldn't start and gave the following error on console (please note that I edited the sendmail.cf file to include my isp's smtp address under sendmail's relay host command DSsmtp.address.of.myISP)
Code:
Aug 29 00:43:13 mysun sendmail[6194]: NOQUEUE: SYSERR(root): /etc/mail/sendmail.
cf: line 65: missing valid ruleset for "R\001* < @ \001* .\001m. > \001*\t\001#esmtp \001@ \0012.\001m \001: \0011 < @ \0012.\001m. > \0013"

Then I saw the sendmail.cf and there was a line that was introduced into it just at the beginning of the sendmail.cf
Code:
<snip>
#####  $Id: generics_entire_domain.m4,v 8.1 1999/03/16 00:43:05 ca Exp $  #####


#####  $Id: genericstable.m4,v 8.23 2002/06/27 23:23:57 gshapiro Exp $  #####

#THIS LINE WAS INTRODUCED
R$* < @ $* .$m. > $*	$#esmtp $@ $2.$m $: $1 < @ $2.$m. > $3


#####  $Id: proto.m4,v 8.711 2004/08/04 21:29:55 ca Exp $  #####

# level 10 config file format
V10/Sun

The sendmail server wouldn't start and kept giving me the above rewrite errors. But if I comment that R$ statement in the sendmail.cf, the sendmail server would start but the FROM address is still unchanged and all my emails bounce back as they go from "root@mysun.localdomain".

Please help....

thanks
rohit
# 6  
Old 08-29-2006
If you don't want to mess around with sendmail configuration files, and it's only you sending out e-mail, you should be able to simply create an alias for "sendmail -f my@outside.email.address", like
Code:
alias 'mailit=sendmail -f my@outside.address'

Put that in your .profile (or whatever shell's config file you are using) and it should take care of the issue.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

sendmail config question

I configured Solaris 10 server to send all mails to our exchange server via D{MTAHost} in submit.cf. but now I don't get internal messages like cron output. what can I do? (2 Replies)
Discussion started by: amozofer
2 Replies

2. Linux

sendmail client config

Hi All, I have a mail server A and a DNS Server B. I am trying to send mail from client C. I have configured the DNS entry in client in the file /etc/resolv.conf and restarted sendmail. My issues : Send mail is working for sending mails to external domain like gmail or yahoo. But the... (0 Replies)
Discussion started by: jegaraman
0 Replies

3. UNIX for Advanced & Expert Users

Sendmail config error: Warning: program unsafe

I trying to to run RT 3.6.7 on Solaris 10. I am using Sendmail v. 8.13.8. I'm using this guide from Sun: http://www.sun.com/bigadmin/features...q_track_1.html http://www.sun.com/bigadmin/features...q_track_2.html uname -a SunOS vpd1tst1no 5.10 Generic_127111-11 sun4u sparc... (1 Reply)
Discussion started by: Mariognarly
1 Replies

4. Solaris

sendmail question

Hello all, On my solaris 9 I have this process running smmsp 29138 1 0 Apr 17 ? 0:00 /usr/lib/sendmail -Ac -q15m root 29137 1 0 Apr 17 ? 0:00 /usr/lib/sendmail -q15m if i use the command /usr/bin/mconnect connecting to host localhost (127.0.0.1), port... (0 Replies)
Discussion started by: Hugues
0 Replies

5. Solaris

Sendmail Question

Hi Guys, Quick question re sendmail and mail queues. If the sendmail deamon is stopped i.e. set up to execute and stop at certain intervals from crontab, and the sendmail command is invoked the mail is queued in the clientmqueue directory. Then the next time sendmail is executed the mails... (2 Replies)
Discussion started by: KenLynch
2 Replies

6. Solaris

Sendmail Config - Open Relay

Puzzled; I have two Solaris systems, both running Solaris 5.8 and Sendmail version 8.11.7p1. One of the machines will not allow relaying (via anonymous connection to port 25). The other will allow relaying from anywhere to anywhere with impunity. I can not find any fundemental difference in the... (1 Reply)
Discussion started by: fosteria
1 Replies

7. UNIX for Dummies Questions & Answers

Sendmail config on AIX 5.3

Hi, I've looked through the posts here and tried everything and cannot get sendmail to work properly. The server only needs to send and not receive mail. I need it to be routed through an open relay which has ip address of 10.126.35.8. Here's what I've done so far: I have amended... (1 Reply)
Discussion started by: johnbrickell
1 Replies

8. Solaris

sendmail - config help?

Hi, I need to configure sendmail to use an external mail server for internet mail's... Anyone help me at all? (6 Replies)
Discussion started by: frustrated1
6 Replies

9. UNIX for Advanced & Expert Users

Sendmail question

How would I configure sendmail so that the INTERN group can only send email locally to xyz.com, while the EXTERN group can send email anywhere. Thanks for your help! (5 Replies)
Discussion started by: Malbeuf
5 Replies

10. UNIX for Dummies Questions & Answers

php config question (on unix)

i received the following error when trying to update the server to php 4.1.2... Internal Server Configuration Error Syntax error on line 58 of /usr/local/etc/httpd/conf/httpd.conf: Cannot load /usr/local/etc/httpd/modules/mod_php4-4.1.2-module-mysql-imap.so into server:... (1 Reply)
Discussion started by: bikr
1 Replies
Login or Register to Ask a Question