LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Sendmail M4 configuration base directory /usr/share/sendmail-cf was not found (https://www.linuxquestions.org/questions/linux-server-73/sendmail-m4-configuration-base-directory-usr-share-sendmail-cf-was-not-found-841652/)

eliassal 11-01-2010 06:12 AM

Sendmail M4 configuration base directory /usr/share/sendmail-cf was not found
 
Hi,
I am using webmin for my daily tasks. I have fedora 13, whenever I click on ''Sendmail M4 Configuration'' or Outgoing Addresses (generics)'' I get the following error message

Quote:

The Sendmail M4 configuration base directory /usr/share/sendmail-cf was not found on your system, or is not the correct directory. Maybe it has not been installed (common for packaged installs of Sendmail), or the module config is incorrect.
I read documentation at sendmail.org, it seems that structure of directories for send mail has been changed in version sendmail-8.1.4 shipped with FC13.
In webmin config module we have
Quote:

Sendmail M4 base directory = /usr/share/sendmail-cf
which is not there. I did a locate / sendmail-cf on the command line, it finds nothing
Thanks for your help

prayag_pjs 11-01-2010 06:40 AM

Hi,

Please see if sendmail rpm is installed

Code:

rpm -qa |grep -i sendmail

eliassal 11-01-2010 11:29 AM

Yes
 
Yes sir it is setup
Code:

[root@myinux salam]# rpm -qa |grep -i sendmail
sendmail-8.14.4-4.fc13.x86_64


bathory 11-02-2010 01:16 AM

You need to install also sendmail-cf package
Code:

yum install sendmail-cf
Regards

eliassal 11-02-2010 06:02 PM

Correct
 
Thanks, I setup sendmail-cf and error disappeared.
From command line I can send email to root.
I tried to test sendmail setup by sending an email to my public email provided by my internet provider as follows
Code:

mail oneofemails@free.fr
I get the error
Quote:

553 sorry, your
envelope sender domain must exist (#5.7.1) (in reply to MAIL FROM command) while talking to mx1.free.fr
I added
Code:

FEATURE(`genericstable')dnl
I have generictable with 1 record
root myemail@free.fr
which I can see in the list of outgoing emails in webmin
Also, I modified smart host as follows
Code:

dnl define(`SMART_HOST', `smtp.free.fr')dnl
and added
Code:

FEATURE(`authinfo',`hash /etc/mail/auth/client-info')
in which I have authentification information for myemail@free.fr for my smtp.free.fr provider smtp.

Still getting the ame error.

Thanks for your help

bathory 11-03-2010 03:06 AM

You should post the whole error (all the headers of the return mail) and maybe also what is logged in /var/log/maillog.
I can only guess that you have to masquerade your hostname. Take a look here for details

Regards

eliassal 11-03-2010 06:46 AM

Bathory, in webmin, it is clearly indicated "Domain Masquerading'' the following
Quote:

If a domain is given above, sendmail will alter the From address of all outgoing messages to appear to come from that domain. In addition, any email messages passing through your system from one of the hosts or domains listed below will also have their From addresses modified in the same way. Note that any domain masquerading defined here can be overriden for specific users using the Outgoing Addresses page.
As I said, I have configured in ''outgoing addresses''
Code:

Mail from                Change to
root                      mylinux@free.fr

Do you mean that I shoul have both configured in order that redirection works.

Here is the info from maillog

Quote:

Nov 2 23:48:42 salamlinux sm-msp-queue[755]: starting daemon (8.14.4): queueing@01:00:00
Nov 2 23:50:08 salamlinux sendmail[906]: oA2Mo772000906: from=root, size=226, class=0, nrcpts=1, msgid=<201011022250.oA2Mo772000906@localhost.localdomain>, relay=root@localhost
Nov 2 23:50:08 salamlinux sendmail[907]: oA2Mo8jQ000907: from=<root@localhost.localdomain>, size=485, class=0, nrcpts=1, msgid=<201011022250.oA2Mo772000906@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=salamlinux [127.0.0.1]
Nov 2 23:50:08 salamlinux sendmail[906]: oA2Mo772000906: to=anotheremail@free.fr, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30226, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (oA2Mo8jQ000907 Message accepted for delivery)
Nov 2 23:50:08 salamlinux sendmail[909]: oA2Mo8jQ000907: to=<anotheremail@free.fr>, ctladdr=<root@localhost.localdomain> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=120485, relay=mx1.free.fr. [212.27.48.6], dsn=5.1.1, stat=User unknown
Nov 2 23:50:08 salamlinux sendmail[909]: oA2Mo8jQ000907: oA2Mo8jQ000909: DSN: User unknown
Nov 2 23:50:08 salamlinux sendmail[909]: oA2Mo8jQ000909: to=<root@localhost.localdomain>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31722, dsn=2.0.0, stat=Sent
and the email alert I receive for root

The original message was received at Tue, 26 Oct 2010 18:01:16 +0200
from salamlinux [127.0.0.1]
Quote:

----- The following addresses had permanent fatal errors -----
<mylinux@free.fr>
(reason: 550 5.1.8 your MAIL FROM is refused for this recipient : 553 sorry, your envelope sender domain must exist (#5.7.1))

----- Transcript of session follows -----
... while talking to mx1.free.fr.:
>>> RCPT To:<anotheremail@free.fr>
<<< 550 5.1.8 your MAIL FROM is refused for this recipient : 553 sorry, your envelope sender domain must exist (#5.7.1)
550 5.1.1 <mylinux@free.fr>... User unknown
>>> DATA
<<< 554 5.5.1 no valid recipients

bathory 11-03-2010 07:57 AM

Quote:

... from=<root@localhost.localdomain>, ...
As you see this doesn't work. I guess you have to add localhost.localdomain in /etc/mail/genericsdomain, depending of your sendmail configuration.
If you don't want to go with masquerading, take a look at this thread here at LQ (specially last post)

Regards

eliassal 11-03-2010 12:17 PM

Not so clear GENERICS_DOMAIN_FILE for me
 
bathory,
In this thread it is indicated to add
GENERICS_DOMAIN_FILE(`/etc/mail/genericsdomain')
how this should be added? snedmail.cf, there is "define'', "feature, I tried to adding it manullay to cf filem, it doesnt rebuild, I used webmin same result, where this directive should go, is it a feature, a parameter, define or other
When I add
Quote:

Other GENERICS_DOMAIN_FILE(`/etc/mail/genericsdomain`)dnl
Rebuild fails with this
Code:

Failed to build configuration :
m4:/etc/mail/sendmail.mc:178: ERROR: end of file in string

.......
I am really stuck

bathory 11-03-2010 01:33 PM

You need to add this in the sendmail.mc used to create your current sendmail.cf. After that you should run:
Code:

m4 sendmail.mc > /etc/mail/sendmail.cf
Before anything else you should make a backup of your current running sendmail.cf, because the above command will overwrite the existing sendmail.cf

Regards

eliassal 11-03-2010 03:49 PM

added and ran m4, but .....
 
Thanks bathory,
added the lines manullay to .mc file, ran the m4 and have a new sendmail.cf generated
I also regenerated the genericstable.
still getting the same error as if sendmail; is not taking into consideration the mapping with outgoing addresses generics table

bathory 11-03-2010 06:41 PM

Did you created the /etc/mail/genericsdomain?
From the link of my previous post you should run:
Code:

sendmail -bt -d0.1 < /dev/null
to find out what domain names you should put in that file. You need to restart sendmail for the changes to take effect.
I also think that you need to add:
Code:

FEATURE(`masquerade_envelope')dnl
in the sendmail.mc file, so both the header and the envelope "From:" address is rewritten

eliassal 11-03-2010 07:01 PM

Yes I did
 
es, I did this, stoped and restarted sendmail.
Here is te last portion of m sendmail.mc

Quote:

dnl FEATURE(masquerade_envelope)dnl
dnl #
dnl # masquerade not just @mydomainalias.com, but @*.mydomainalias.com as well
dnl #
dnl FEATURE(masquerade_entire_domain)dnl
dnl #
dnl MASQUERADE_DOMAIN(localhost)dnl
dnl MASQUERADE_DOMAIN(localhost.localdomain)dnl
dnl MASQUERADE_DOMAIN(mydomainalias.com)dnl
dnl MASQUERADE_DOMAIN(mydomain.lan)dnl
FEATURE(`genericstable',`hash /etc/mail/genericstable')
MAILER(smtp)dnl
MAILER(procmail)dnl
dnl MAILER(cyrusv2)dnl
dnl GENERICS_DOMAIN_FILE(`/etc/mail/genericsdomain`)dnl


eliassal 11-03-2010 07:09 PM

sorry I clicked submit before I finishe
 
So you can notice
dnl FEATURE(masquerade_envelope)dnl
and
dnl GENERICS_DOMAIN_FILE(`/etc/mail/genericsdomain`)dnl.

Regarding
Code:

sendmail -bt -d0.1 < /dev/null
One question though to be on the same page, should I create a file called genericsdomain and leave it empty? After running this command, I get some infoirmation displayed as follows

Quote:

[root@mylinux mail]# sendmail -bt -d0.1 < /dev/null
Version 8.14.4
Compiled with: DNSMAP HESIOD HES_GETMAILHOST LDAPMAP LOG MAP_REGEX
MATCHGECOS MILTER MIME7TO8 MIME8TO7 NAMED_BIND NETINET NETINET6
NETUNIX NEWDB NIS PIPELINING SASLv2 SCANF SOCKETMAP STARTTLS
TCPWRAPPERS USERDB USE_LDAP_INIT

============ SYSTEM IDENTITY (after readcf) ============
(short domain name) $w = localhost
(canonical domain name) $j = localhost.localdomain
(subdomain name) $m = localdomain
(node name) $k = mylinux
========================================================

ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
so should I do something this?

eliassal 11-03-2010 07:16 PM

By ''to find out what domain names you should put in that file''

Do you or the thread write mean I need to manually create a file and place

Quote:

============ SYSTEM IDENTITY (after readcf) ============
(short domain name) $w = localhost
(canonical domain name) $j = localhost.localdomain
(subdomain name) $m = localdomain
(node name) $k = mylinux
========================================================
or only

Quote:

localhost
localhost.localdomain
localdomain


All times are GMT -5. The time now is 10:22 AM.