Solved

sendmail.cf without m4

Posted on 2013-11-11
4
409 Views
Last Modified: 2013-12-30
I have a redhat linux server that send log files to various users. We have recently migrated our email to office365 and I can not send anymore because our stmp server has changed.  I have read many documents on configuring the sendmail.mc file. It requires using m4 to produce the sendmail.cf file. I can not use m4 because sendmail-cf was not installed on the server. We can not install it because of support issues. However, I can make the changes directly in the sendmail.cf file. Here is what the sendmail.mc has:

divert(-1)dnl
dnl include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for linux')dnl
OSTYPE(`linux')dnl
define(`SMART_HOST',`smtp.gmail.com')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 587')
define(`ESMTP_MAILER_ARGS', `TCP $h 587')
define(`confDEF_USER_ID', ``8:12'')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST', `True')dnl
define(`confDONT_PROBE_INTERFACES', `True')dnl
define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
define(`STATUS_FILE', `/var/log/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A p')dnl
define(`confTO_IDENT', `0')dnl
FEATURE(`authinfo',`hash -o /etc/mail/auth/client-info.db')dnl
dnl #
dnl # Rudimentary information on creating certificates for sendmail TLS:
dnl #
dnl #     cd /etc/pki/tls/certs;
dnl #      make sendmail.pem
dnl #
define(`confAUTH_OPTIONS', `A p')dnl
define(`confCACERT_PATH', `/etc/pki/tls/certs')dnl
define(`confCACERT', `/etc/pki/tls/certs/ca-bundle.crt')dnl
define(`confSERVER_CERT', `/etc/pki/tls/certs/sendmail.pem')dnl
define(`confSERVER_KEY', `/etc/pki/tls/certs/sendmail.pem')dnl
FEATURE(`no_default_msa', `dnl')dnl
FEATURE(`smrsh', `/usr/sbin/smrsh')dnl
FEATURE(`mailertable', `hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable.db')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
FEATURE(local_procmail, `', `procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db', `hash -T -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
EXPOSED_USER(`root')dnl
FEATURE(`accept_unresolvable_domains')dnl
FEATURE(`relay_based_on_MX')dnl
LOCAL_DOMAIN(`localhost.localdomain')dnl
MASQUERADE_AS(`mybrcc.edu')dnl
FEATURE(masquerade_envelope)dnl
FEATURE(masquerade_entire_domain)dnl
MASQUERADE_DOMAIN(`mybrcc.edu')dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
MAILER(cyrusv2)dnl


I need this translated into sendmail.cf file. Thanks in advance.
0
Comment
Question by:rsolomon
  • 2
4 Comments
 
LVL 28

Expert Comment

by:Jan Springer
ID: 39641557
You can configure the sendmail.cf file directly (and carefully).

It's just not clear what has changed with regard to this mail server so that I can advise of the changes needed.
0
 
LVL 19

Expert Comment

by:xterm
ID: 39646392
Here you go, sendmail.txt is attached (it wouldn't take .cf). I had to correct two lines in your mc file:
dnl include(`/usr/share/sendmail-cf/m4/cf.m4')dnl

changed to:
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl

and:
FEATURE(`access_db', `hash -T -o /etc/mail/access.db')dnl

changed to:
FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl
sendmail.txt
0
 
LVL 61

Accepted Solution

by:
gheist earned 500 total points
ID: 39650580
Postfix is default on EL6... It replaces sendmail just fine and has primary config in text files...
If you want to edit cf file you need to get veeryy old UNIX manuals or books (before 2000 is a good try)
0
 
LVL 61

Expert Comment

by:gheist
ID: 39745794
A simple point - recent (like post-2000) sendmail releases do not document cf file editing and make config using m4...
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Resolve DNS query failed errors for Exchange
Resolve Outlook connectivity issues after moving mailbox to new Exchange 2016 server
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now