1 |
Hello all, |
2 |
|
3 |
Probably the sendmail-list would be the better place for this rant |
4 |
but I think I'll check with you guys first, just to see whether or not |
5 |
I've missed something obvious. |
6 |
|
7 |
I'm trying to get sendmail to work properly on my laptop. It's forwarding |
8 |
all mail to the smarthost `mail.gmx.net' [1]. That's a free German |
9 |
service - and I'm considering leaving it looking at the trouble they're |
10 |
causing... |
11 |
|
12 |
Now first of all, I'm using a dial-up connection (ADSL PPPoE) - So my IP |
13 |
adresses are changing on a regular basis and I'm not registered with any |
14 |
dynamic DNS-service. I don't have a FDQN and I don't want/need one, do I? |
15 |
/etc/conf.d/hostname contains just `HOSTNAME="mymachine"', where `mymachine' |
16 |
is how I called my machine. I did not set te domain name. Is there a |
17 |
reason I should? So /etc/hosts just contains |
18 |
|
19 |
127.0.0.1 localhost mymachine |
20 |
::1 localhost |
21 |
|
22 |
Fair enough. But sendmail does not like this setup. When starting it via |
23 |
the init scripts it lags seriously and checking the logs gives: |
24 |
|
25 |
Jul 16 02:06:14 [sendmail] My unqualified host name (localhost) unknown; sleeping for retry |
26 |
Jul 16 02:07:14 [sendmail] unable to qualify my own domain name (localhost) -- using short name |
27 |
|
28 |
... repeatedly. Whether or not I set HOSTNAME to be some |
29 |
$phantasy_value or just `localhost' does not make any difference. |
30 |
BUT if I set my hostname to something as stupid as |
31 |
`mymachine.foo' (LITERAL `foo') _or even_ just `mymachine.' sendmail stops |
32 |
to complain and starts immediately (Yes, I restarted /etc/init.d/hostname). |
33 |
What's the deal? |
34 |
Why this stupid behaviour? Why does it want to have a `.' in the |
35 |
hostname - why do I have to trick it so that it thinks it has a domain |
36 |
where in reality it does not? |
37 |
|
38 |
Anyways, now with sendmail up and running, I want to send e-mails. Alas, |
39 |
it seems impossible. Sendmail seems to ignore 50% of its configuration |
40 |
files. First of all, you might notice the X-Authentication-Warning |
41 |
flag in this email's header. Well, for mail.gmx.net to accept an e-mail |
42 |
I have to invoke sendmail with the `-fmyemailaddress@×××.de' flag, wich |
43 |
causes sendmail to add this header for obvious anti-spamming reasons. |
44 |
That's fine and sendmail seems to offer a mechanism which can circumvent |
45 |
the printing of this warning to the message's headers: trusted users. So |
46 |
I add my user to trusted useres using this directive in sendmail.mc |
47 |
|
48 |
define(`confTRUSTED_USERS', `me')dnl |
49 |
|
50 |
rebuild sendmail.cf, restart sendmail and - nothing happens. I tried |
51 |
different mechanisms, for example /etc/mail/trusted-users and the |
52 |
according directives. To no avail. Sendmail ignores them all. |
53 |
|
54 |
Without the `-fsomeemailaddress' flag, I can't send any e-mail at all |
55 |
because mail.gmx.net will give me only negative responses like `Service |
56 |
unavailable' and a message which says something like `this server does |
57 |
not accept empty envelopes from'. It stops after the `from' leaving the |
58 |
whole sentence ungrammatical... |
59 |
|
60 |
What am I doing wrong? I'll give you my sendmail.mc in |
61 |
case it helps: |
62 |
|
63 |
sendmail.mc |
64 |
=================== |
65 |
divert(-1) |
66 |
divert(0)dnl |
67 |
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl |
68 |
VERSIONID(`$Id: sendmail-procmail.mc,v 1.2 2004/12/07 01:59:31 g2boojum Exp $')dnl |
69 |
OSTYPE(linux)dnl |
70 |
DOMAIN(generic)dnl |
71 |
define(`SMART_HOST',`mail.gmx.net')dnl |
72 |
MASQUERADE_AS(`gmx.de')dnl |
73 |
FEATURE(masquerade_envelope)dnl |
74 |
MASQUERADE_DOMAIN(mymachine.local)dnl |
75 |
dnl define(`confTRUSTED_USERS',`me')dnl |
76 |
define(`confAUTH_MECHANISMS', `DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl |
77 |
define(`confPRIVACY_FLAGS', `novrfy,noexpn')dnl |
78 |
FEATURE(`authinfo',`hash /etc/mail/auth/client-info')dnl |
79 |
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl |
80 |
FEATURE(`local_lmtp',`/usr/sbin/mail.local')dnl |
81 |
FEATURE(`local_procmail')dnl |
82 |
MAILER(local)dnl |
83 |
MAILER(smtp)dnl |
84 |
MAILER(procmail)dnl |
85 |
|
86 |
I have tried /various/ configurations and read _a lot_ of docs most of |
87 |
the relevant sections of O'Reillys sendmail book. I did not find my |
88 |
mistake so far. There are two issues to be resolved and they are |
89 |
independant: |
90 |
|
91 |
1) Why does sendmail ignore me as a trusted user? If I execute mutt as |
92 |
root and send the e-mail it does not issue an x-auth warning |
93 |
2) What's wrong with all those domains? |
94 |
|
95 |
I'll appreciate even _reading_ through this lenghty mail, let alone |
96 |
_answering_ - so thanks to anybody willing to help |
97 |
|
98 |
Yours, |
99 |
Aleks |
100 |
|
101 |
P.S. while writing the e-mail I've already concluded that I'll just |
102 |
leave the domains as they are and use the `-f' switch, but only with |
103 |
`-faleks_d', because I don't have the e-mail address `aleks@×××.de', but |
104 |
that's my username on _my_ machine. So the most pressing issue is to let |
105 |
sendmail send mail that does not include this ugly |
106 |
X-Authentication-Warning header. It's really ugly, you must admit ;-) |
107 |
|
108 |
|
109 |
[1] but it's qmail, how can it be smart then? ... :-P |