Newsgroup: it.comp.os.linux.sys
Titolo: sendmail

Ciao a tutti
Ho appena finito di configurare sendmail e sembra che vada tutto bene. Ora 
gli utenti del mio sistema possono spedirsi e-mail tra di loro e le mail da 
me spedite all'esterno vengono messe in coda e spedite con il comando 
sendmail -q
Ho usato il seguente file .mc che ho ramazzato in un articolo su internet
# start of 
config.mc
include(`../m4/cf.m4')dnl
OSTYPE(`linux')dnl
define(`SMTP_MAILER_FLAGS', `e9')dnl
FEATURE(redirect)dnl
FEATURE(nocanonify)dnl
FEATURE(always_add_domain)dnl
FEATURE(local_procmail)dnl
GENERICS_DOMAIN(localhost.localdomain localhost localhost)
FEATURE(genericstable)
FEATURE(masquerade_envelope)dnl
define(`confCF_VERSION',`dede's cf - 22/05/98')dnl
define(`confCON_EXPENSIVE',`True')dnl
define(`confME_TOO',`True')dnl
define(`confCOPY_ERRORS_TO',`Postmaster')dnl
define(`confDEF_CHAR_SET',`ISO-8859-1')dnl
define(`confMIME_FORMAT_ERRORS',`True')dnl
define(`SMART_HOST',`smtp8:[
mail.inwind.it
]')dnl
define(`confTO_QUEUEWARN',`24h')
MAILER(local)
MAILER(smtp)
# End of 
config.mc
dove alla linea con SMART HOST ho messo 
mail.inwind.it
 per mandare le mie 
mail 
a inwind. E funziona bene.
In /etc/genericstable:
 
francy:   
feyn...@inwind.it
root:   
feyn...@inwind.it
news:   
feyn...@inwind.it
Perň vorrei fare di piů. Cioč vorrei che ogni utente del sistema potesse 
mandare le proprie e-mail al proprio isp.
Credo, a rigore, che in /etc/genericstable devo mettere 
utentex : 
mailu...@suoisp.it
in modo da dirgli la sua casella
ma in 
config.mc
 come devo fare??
Grazie mille
FT

 Credo, a rigore, che in /etc/genericstable devo mettere 
Non capisco, tu vuoi che ogni tuo utente mandi una mail una mail al
proprio ISP direttamente o vuoi che la mandino a loro stessi usando
uno schema del genere:
utenteX -> Sendmail -> ISP -> utenteX
invece di:
utenteX -> Sendmail -> utenteX
?
Se e` la prima, allora devi registrare il record MX del tuo MTA via
Internet (un qualsiasi servizio che ti permetta la registrazione di
un tuo dominio su Internet va bene). Se e` la seconda, invece, devi
smeplicemente togliere qualsiasi riferimento da /etc/genericstable,
che dovrebbe funzionare come il file virtual di Postfix
Henryx
P.S. metti sia per root, sia per tutti gli altri utenti di sistema,
un alias in /etc/aliases in modo che puntino al tuo utente
-- 
GnuPG fingerprint = 42F9 521B 63C7 89FE 354C  89FA 4E49 3E2D 2EB6 B014

Problema: se faccio
telnet localhost 25
sendmail mi risponde e mi fa inviare posta
se tento il telnet sull'ip pubblico ho connection refused...
dove sta l'inghippo ?
P.S. non ho iptables attivato
allego il mio 
sendmail.cf
# level 10 config file format
V10/Berkeley
# override file safeties - setting this option compromises system security,
# addressing the actual file configuration problem is preferred
# need to set this before any file actions are encountered in the cf file
O DontBlameSendmail=AssumeSafeChown,TrustStickyBit,GroupReadableSASLDBFile
# default LDAP map specification
# need to set this now before any LDAP maps are defined
#O LDAPDefaultSpec=-h localhost
##################
#   local info   #
##################
# my LDAP cluster
# need to set this before any LDAP lookups are done (including classes)
#D{sendmailMTACluster}$m
Cwlocalhost
# file containing names of hosts for which we receive email
Fw-o /etc/mail/local-host-names %[^\#]
# my official domain name
# ... define this only if sendmail cannot automatically determine your
domain
#Dj$
w.Foo.COM
CP.
# "Smart" relay host (may be null)
DS
# operators that cannot be in local usernames (i.e., network indicators)
CO @ % !
# a class with just dot (for identifying canonical names)
C..
# a class with just a left bracket (for identifying domain literals)
C[[
# access_db acceptance class
C{Accept}OK RELAY
# Resolve map (to check if a host exists in check_mail)
Kresolve host -a<OKR> -T<TEMP>
C{ResOk}OKR
# Hosts for which relaying is permitted ($=R)
FR-o /etc/mail/relay-domains %[^\#]
# arithmetic map
Karith arith
# macro storage map
Kmacro macro
# possible values for TLS_connection in access map
C{tls}VERIFY ENCR
# dequoting map
Kdequote dequote
# class E: names that should be exposed as from this host, even if we
masquerade
# class L: names that should be delivered locally, even if we have a relay
# class M: domains that should be converted to $M
# class N: domains that should not be converted to $M
#CL root
C{E}root
# my name for error messages
DnMAILER-DAEMON
# Mailer table (overriding domains)
Kmailertable hash -o /etc/mail/mailertable.db
# Generics table (mapping outgoing addresses)
Kgenerics hash -o /etc/mail/genericstable.db
# Virtual user table (maps incoming users)
Kvirtuser hash -o /etc/mail/virtusertable.db
# Access list database (for spam stomping)
Kaccess hash -T<TMPF> -o /etc/mail/access.db
CPREDIRECT
# Configuration version number
DZ8.12.2/SuSE Linux 0.6
###############
#   Options   #
###############
# strip message body to 7 bits on input?
O SevenBitInput=False
# 8-bit data handling
#O EightBitMode=pass8
# wait for alias file rebuild (default units: minutes)
O AliasWait=10
# location of alias file
O AliasFile=/etc/aliases
# minimum number of free blocks on filesystem
O MinFreeBlocks=100
# maximum message size
#O MaxMessageSize=1000000
# substitution for space (blank) characters
O BlankSub=.
# avoid connecting to "expensive" mailers on initial submission?
O HoldExpensive=False
# checkpoint queue runs after every N successful deliveries
#O CheckpointInterval=10
# default delivery mode
O DeliveryMode=background
# error message header/file
#O ErrorHeader=/etc/mail/error-header
# error mode
#O ErrorMode=print
# save Unix-style "From_" lines at top of header?
#O SaveFromLine=False
# queue file mode (qf files)
#O QueueFileMode=0600
# temporary file mode
O TempFileMode=0600
# match recipients against GECOS field?
#O MatchGECOS=False
# maximum hop count
#O MaxHopCount=25
# location of help file
O HelpFile=/usr/lib/sendmail.d/helpfile
# ignore dots as terminators in incoming messages?
#O IgnoreDots=False
# name resolver options
#O ResolverOptions=+AAONLY
# deliver MIME-encapsulated error messages?
O SendMimeErrors=True
# Forward file search path
O ForwardPath=$z/.forward.$w+$h:$z/.forward+$h:$z/.forward.$w:$z/.forward
# open connection cache size
O ConnectionCacheSize=2
# open connection cache timeout
O ConnectionCacheTimeout=5m
# persistent host status directory
O HostStatusDirectory=.hoststat
# single thread deliveries (requires HostStatusDirectory)?
#O SingleThreadDelivery=False
# use Errors-To: header?
O UseErrorsTo=False
# log level
O LogLevel=9
# send to me too, even in an alias expansion?
#O MeToo=True
# verify RHS in newaliases?
O CheckAliases=False
# default messages to old style headers if no special punctuation?
O OldStyleHeaders=True
# SMTP daemon options
O DaemonPortOptions=Port=smtp,Addr=0.0.0.0, Name=MTA
# SMTP client options
#O ClientPortOptions=Family=inet, Address=0.0.0.0
# Modifiers to define {daemon_flags} for direct submissions
#O DirectSubmissionModifiers
# Use as mail submission program? See sendmail/SECURITY
#O UseMSP
# privacy flags
O PrivacyOptions=authwarnings,needmailhelo,novrfy,noexpn,noverb
# who (if anyone) should get extra copies of error messages
O PostmasterCopy=Postmaster
# slope of queue-only function
#O QueueFactor=600000
# limit on number of concurrent queue runners
#O MaxQueueChildren
# maximum number of queue-runners per queue-grouping with multiple queues
#O MaxRunnersPerQueue=1
# priority of queue runners (nice(3))
#O NiceQueueRun
# shall we sort the queue by hostname first?
#O QueueSortOrder=priority
# minimum time in queue before retry
#O MinQueueAge=30m
# how many jobs can you process in the queue?
#O MaxQueueRunSize=10000
# perform initial split of envelope without checking MX records
#O FastSplit=1
# queue directory
O QueueDirectory=/var/spool/mqueue
# key for shared memory; 0 to turn off
#O SharedMemoryKey=0
# timeouts (many of these)
#O Timeout.initial=5m
#O Timeout.connect=5m
#O Timeout.aconnect=0s
O Timeout.iconnect=30s
#O Timeout.helo=5m
#O Timeout.mail=10m
#O Timeout.rcpt=1h
#O Timeout.datainit=5m
#O Timeout.datablock=1h
#O Timeout.datafinal=1h
#O Timeout.rset=5m
#O Timeout.quit=2m
#O Timeout.misc=2m
O Timeout.command=24h
O Timeout.ident=0s
#O Timeout.fileopen=60s
#O Timeout.control=2m
O Timeout.queuereturn=5d
#O Timeout.queuereturn.normal=5d
#O Timeout.queuereturn.urgent=2d
#O Timeout.queuereturn.non-urgent=7d
O Timeout.queuewarn=4h
#O Timeout.queuewarn.normal=4h
#O Timeout.queuewarn.urgent=1h
#O Timeout.queuewarn.non-urgent=12h
#O Timeout.hoststatus=30m
#O Timeout.resolver.retrans=5s
#O Timeout.resolver.retrans.first=5s
#O Timeout.resolver.retrans.normal=5s
#O Timeout.resolver.retry=4
#O Timeout.resolver.retry.first=4
#O Timeout.resolver.retry.normal=4
#O Timeout.lhlo=2m
#O Timeout.auth=10m
#O Timeout.starttls=1h
# time for DeliverBy; extension disabled if less than 0
#O DeliverByMin=0
# should we not prune routes in route-addr syntax addresses?
#O DontPruneRoutes=False
# queue up everything before forking?
O SuperSafe=True
# status file
O StatusFile=/var/log/statistics
# time zone handling:
#  if undefined, use system default
#  if defined but null, use TZ envariable passed in
#  if defined and non-null, use that info
#O TimeZoneSpec=
# default UID (can be username or userid:groupid)
O DefaultUser=daemon:daemon
# list of locations of user database file (null means no lookup)
O UserDatabaseSpec=/etc/mail/userdb.db
# fallback MX host
#O FallbackMXhost=
fall.back.host.net
# if we are the best MX host for a site, try it directly instead of config
err
#O TryNullMXList=False
# load average at which we just queue messages
#O QueueLA=8
# load average at which we refuse connections
#O RefuseLA=12
# load average at which we delay connections; 0 means no limit
#O DelayLA=0
# maximum number of children we allow at one time
O MaxDaemonChildren=15
# maximum number of new connections per second
#O ConnectionRateThrottle=0
# work recipient factor
#O RecipientFactor=30000
# deliver each queued job in a separate process?
#O ForkEachJob=False
# work class factor
#O ClassFactor=1800
# work time factor
#O RetryFactor=90000
# default character set
#O DefaultCharSet=iso-8859-1
# service switch file (name hardwired on Solaris, Ultrix, OSF/1, others)
O ServiceSwitchFile=/etc/mail/service.switch
# hosts file (normally /etc/hosts)
O HostsFile=/etc/hosts
# dialup line delay on connection failure
#O DialDelay=10s
# action to take if there are no recipients in the message
O NoRecipientAction=add-to-undisclosed
# chrooted environment for writing to files
#O SafeFileEnvironment=/arch
# are colons OK in addresses?
#O ColonOkInAddr=True
# shall I avoid expanding CNAMEs (violates protocols)?
#O DontExpandCnames=False
# SMTP initial login message (old $e macro)
O SmtpGreetingMessage=$j Sendmail $v/$Z; $b
# UNIX initial From header format (old $l macro)
O UnixFromLine=From $g $d
# From: lines that have embedded newlines are unwrapped onto one line
#O SingleLineFromHeader=False
# Allow HELO SMTP command that does not include a host name
#O AllowBogusHELO=False
# Characters to be quoted in a full name phrase (@,;:\()[] are automatic)
#O MustQuoteChars=.
# delimiter (operator) characters (old $o macro)
O OperatorChars=.:%@!^/[]+
# shall I avoid calling initgroups(3) because of high NIS costs?
#O DontInitGroups=False
# are group-writable :include: and .forward files (un)trustworthy?
# True (the default) means they are not trustworthy.
#O UnsafeGroupWrites=True
# where do errors that occur when sending errors get sent?
#O DoubleBounceAddress=postmaster
# where to save bounces if all else fails
O DeadLetterDrop=/var/log/dead.letter
# what user id do we assume for the majority of the processing?
#O RunAsUser=sendmail
# maximum number of recipients per SMTP envelope
#O MaxRecipientsPerMessage=100
# limit the rate recipients per SMTP envelope are accepted
# once the threshold number of recipients have been rejected
#O BadRcptThrottle=20
# shall we get local names from our installed interfaces?
#O DontProbeInterfaces=False
# Return-Receipt-To: header implies DSN request
#O RrtImpliesDsn=False
# override connection address (for testing)
#O ConnectOnlyTo=0.0.0.0
# Trusted user for file ownership and starting the daemon
#O TrustedUser=root
# Control socket for daemon management
O ControlSocketName=/var/run/sendmail/control
# Maximum MIME header length to protect MUAs
O MaxMimeHeaderLength=256/128
# Maximum length of the sum of all headers
O MaxHeadersLength=32768
# Maximum depth of alias recursion
#O MaxAliasRecursion=10
# location of pid file
#O PidFile=/var/run/sendmail.pid
# Prefix string for the process title shown on 'ps' listings
#O ProcessTitlePrefix=prefix
# Data file (df) memory-buffer file maximum size
#O DataFileBufferSize=4096
# Transcript file (xf) memory-buffer file maximum size
#O XscriptFileBufferSize=4096
# lookup type to find information about local mailboxes
#O MailboxDatabase=pw
# list of authentication mechanisms
#O AuthMechanisms=EXTERNAL GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5
# default authentication information for outgoing connections
#O DefaultAuthInfo=/etc/mail/default-auth-info
# SMTP AUTH flags
#O AuthOptions
# SMTP AUTH maximum encryption strength
#O AuthMaxBits
# SMTP STARTTLS server options
#O TLSSrvOptions
# Input mail filters
#O InputMailFilters
# CA directory
O CACERTPath=/etc/mail/certs
# CA file
#O CACERTFile
# Server Cert
#O ServerCertFile
# Server private key
#O ServerKeyFile
# Client Cert
#O ClientCertFile
# Client private key
#O ClientKeyFile
# DHParameters (only required if DSA/DH is used)
#O DHParameters
# Random data source (required for systems without /dev/urandom under
OpenSSL)
#O RandFile
############################
# QUEUE GROUP DEFINITIONS  #
############################
###########################
#   Message precedences   #
###########################
Pfirst-class=0
Pspecial-delivery=100
Plist=-30
Pbulk=-60
Pjunk=-100
#####################
#   Trusted users   #
#####################
# this is equivalent to setting class "t"
#Ft-o /etc/mail/trusted-users %[^\#]
Troot
Tdaemon
Tuucp
Tmdom wwwrun root uucp daemon mail
#########################
#   Format of headers   #
#########################
H?P?Return-Path: <$g>
HReceived: $?sfrom $s $.$?_($?s$|from $.$_)
 $.$?{auth_type}(authenticated$?{auth_ssf} bits=${auth_ssf}$.)
 $.by $j ($v/$Z)$?r with $r$. id $i$?{tls_version}
 (version=${tls_version} cipher=${cipher} bits=${cipher_bits}
verify=${verify})$.$?u
 for $u; $|;
 $.$b
H?D?Resent-Date: $a
H?D?Date: $a
H?F?Resent-From: $?x$x <$g>$|$g$.
H?F?From: $?x$x <$g>$|$g$.
H?x?Full-Name: $x
# HPosted-Date: $a
# H?l?Received-Date: $b
H?M?Resent-Message-Id: <$t.$i@$j>
H?M?Message-Id: <$t.$i@$j>

 dove sta l'inghippo ?
 
Devo dire che questa e` la prima volta che vedo il 
sendmail.cf
 e devo
dire anche che questo mi ha convinto ancora di piu` ad eliminare ogni
possibile traccia di Sendmail da qualsiasi computer a favore, invece,
di qmail o di Postfix
Un Henryx e i consigli impliciti
