I can not set subdomain name for sendmail. As a result I can't receive external e-mails for that domain.
I spent much time there but did not find a solution.
I spent much time there but did not find a solution.
divert(0)
VERSIONID(`$FreeBSD: release/9.0.0/etc/sendmail/freebsd.mc 223068 2011-06-14 04:33:43Z gshapiro $')
OSTYPE(freebsd6)
DOMAIN(generic)
LOCAL_DOMAIN(`autolobaz.by')dnl
FEATURE(access_db, `hash -o -T<TMPF> /etc/mail/access')
FEATURE(blacklist_recipients)
FEATURE(local_lmtp)
FEATURE(mailertable, `hash -o /etc/mail/mailertable')
FEATURE(virtusertable, `hash -o /etc/mail/virtusertable')
FEATURE(domaintable)dnl
FEATURE(`relay_entire_domain')
dnl Uncomment to allow relaying based on your MX records.
dnl NOTE: This can allow sites to use your server as a backup MX without
dnl your permission.
dnl FEATURE(relay_based_on_MX)
dnl DNS based black hole lists
dnl --------------------------------
dnl DNS based black hole lists come and go on a regular basis
dnl so this file will not serve as a database of the available servers.
dnl For that, visit
dnl [url]http://www.google.com/Top/Computers/Internet/E-mail/Spam/Blacklists/[/url]
dnl Uncomment to activate your chosen DNS based blacklist
dnl FEATURE(dnsbl, `dnsbl.example.com')
dnl Alternatively, you can provide your own server and rejection message:
dnl FEATURE(dnsbl, `dnsbl.example.com', ``"550 Mail from " $&{client_addr} " rejected'')
GENERICS_DOMAIN_FILE(`/etc/mail/generics-domains')dnl
dnl Dialup users should uncomment and define this appropriately
dnl define(`SMART_HOST', `your.isp.mail.server')
dnl Uncomment the first line to change the location of the default
dnl /etc/mail/local-host-names and comment out the second line.
dnl define(`confCW_FILE', `-o /etc/mail/sendmail.cw')
define(`confCW_FILE', `-o /etc/mail/local-host-names')
dnl Enable for both IPv4 and IPv6 (optional)
DAEMON_OPTIONS(`Name=IPv4, Family=inet')
DAEMON_OPTIONS(`Name=IPv6, Family=inet6, Modifiers=O')
DAEMON_OPTIONS(`Port=smtp,Addr=178.172.148.149, Name=MTA')
define(`confDOMAIN_NAME', `mail.autolobaz.by')
define(`confBIND_OPTS', `WorkAroundBrokenAAAA')
define(`confNO_RCPT_ACTION', `add-to-undisclosed')
define(`confPRIVACY_FLAGS', `authwarnings,noexpn,novrfy')
define(`confHELO_NAME', `autolobaz.by')dnl
MASQUERADE_AS(`autolobaz.by')dnl
FEATURE(masquerade_envelope)dnl
MAILER(local)
MAILER(smtp)
# sendmail -bv user@autolobaz.by
# cd /etc/mail
# make
# *** edit the file called {hostname}.mc ***
# make install restart
550 550 relay not permitted (state 13)
ximena# cat /etc/mail/local-host-names
autolobaz.by
ximena# cat /etc/mail/virtusertable
# $FreeBSD: release/9.0.0/etc/mail/virtusertable.sample 68266 2000-11-02 23:32:31Z dirk $
#
# Map one or all usernames at a source hostname to a specific (or the same)
# username at another target hostname. Remember to add the source hostname
# to /etc/mail/local-host-names so that sendmail will accept mail for the
# source hostname.
#
[email]autolobaz@autolobaz.by[/email] localuser
[email]autolobaz@autolobaz.by[/email] [email]autolobaz@ximena.neolocation.net[/email]
@mail.autolobaz.by [email]autolobaz@ximena.neolocation.net[/email]
@yet.mail.autolobaz.by %1@ximena.neolocation.net
ximena# sendmail -bv [email]autolobaz@autolobaz.by[/email]
[email]autolobaz@autolobaz.by[/email]... deliverable: mailer local, user autolobaz
ximena#
autolobaz@autolobaz.by localuser
autolobaz@autolobaz.by autolobaz@ximena.neolocation.net
ximena# sendmail -bv autolobaz@autolobaz.by
autolobaz@autolobaz.by... deliverable: mailer local, user autolobaz
@mail.autolobaz.by [email]autolobaz@ximena.neolocation.net[/email]
@autolobaz.by [email]autolobaz@ximena.neolocation.net[/email]
"/etc/mail/virtusertable" 10 lines, 444 characters
ximena# make
/usr/sbin/makemap hash virtusertable.db < virtusertable
chmod 0640 virtusertable.db
ximena# make install restart
install -m 444 ximena.cf /etc/mail/sendmail.cf
install -m 444 ximena.submit.cf /etc/mail/submit.cf
Restarting: sendmail sendmail-clientmqueue.
ximena#
Oct 31 10:34:37 ximena sendmail[88992]: restarting /usr/sbin/sendmail due to signal
Oct 31 10:34:37 ximena sendmail[89020]: starting daemon (8.14.5): SMTP+queueing@00:30:00
Oct 31 10:34:37 ximena sm-msp-queue[1465]: restarting /usr/sbin/sendmail due to signal
Oct 31 10:34:37 ximena sm-msp-queue[89024]: starting daemon (8.14.5): queueing@00:30:00
Oct 31 10:40:04 ximena sendmail[89020]: restarting /usr/sbin/sendmail due to signal
Oct 31 10:40:04 ximena sm-msp-queue[89024]: restarting /usr/sbin/sendmail due to signal
Oct 31 10:40:04 ximena sendmail[89106]: starting daemon (8.14.5): SMTP+queueing@00:30:00
Oct 31 10:40:04 ximena sm-msp-queue[89107]: starting daemon (8.14.5): queueing@00:30:00
Oct 31 10:45:48 ximena sendmail[89160]: q9V7jlpu089160: from=<integrator@tut.by>, size=1642, class=0, nrcpts=1, msgid=<CAGzOMXY2WOq=PN56z1Dzx_19katk5EEhx3S96aVhNLicdZho=w@mail.gmail.com>, proto=ESMTP, daemon=IPv4, relay=mail-qa0-f50.google.com [209.85.216.50]
Oct 31 10:45:48 ximena sendmail[89161]: q9V7jlpu089160: to=<autolobaz@ximena.neolocation.net>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31919, relay=local, dsn=2.0.0, stat=Sent
ximena#
Oct 31 10:45:48 ximena sendmail[89160]: q9V7jlpu089160: from=<integrator@tut.by>, size=1642, class=0,
nrcpts=1, msgid=<CAGzOMXY2WOq=PN56z1Dzx_19katk5EEhx3S96aVhNL icdZho=w@mail.gmail.com>, proto=ESMTP,
daemon=IPv4, relay=mail-qa0-f50.google.com [209.85.216.50]
Oct 31 10:45:48 ximena sendmail[89161]: q9V7jlpu089160: to=<autolobaz@ximena.neolocation.net>, delay=00:00:00,
xdelay=00:00:00, mailer=local, pri=31919, relay=local, dsn=2.0.0, stat=Sent
@autolobaz.by me@mydomain.com
autolobaz.by
mail.autolobaz.by
@mail.autolobaz.by autolobaz
@autolobaz.by autolobaz
ximena# sendmail -d0.1 -bv autolobaz
Version 8.14.5
Compiled with: DNSMAP LOG MAP_REGEX MATCHGECOS MILTER MIME7TO8 MIME8TO7
NAMED_BIND NETINET NETINET6 NETUNIX NEWDB NIS PIPELINING SCANF
STARTTLS TCPWRAPPERS USERDB XDEBUG
============ SYSTEM IDENTITY (after readcf) ============
(short domain name) $w = ximena
(canonical domain name) $j = ximena.neolocation.net
(subdomain name) $m = neolocation.net
(node name) $k = ximena
========================================================
autolobaz... deliverable: mailer local, user autolobaz
ximena#