Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

sendmail.cf without m4

Posted on 2013-11-11
4
Medium Priority
?
444 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 29

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 62

Accepted Solution

by:
gheist earned 2000 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 62

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Steps to fix error: “Couldn’t mount the database that you specified. Specified database: HU-DB; Error code: An Active Manager operation fail”
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

926 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