Postfis smtp_generic_maps not working

Hi all,

I have my own mailserver at home but it doesn’t work right now because my ISP doesn’t let me send mail directly and the relay host doesn’t work right now because it is a local domain. Now have I found the smtp_generic_maps in the postfix documentation. But I can’t get it to work.

I have the following line in my main.cf:

smtp_generic_maps=hash:/etc/postfix/smtp_map

And this is my smtp_map:

@Thijs-Desktop.lan  Thijs.Voncken@xs4all.nl

and this is my postfix log since last reload:


Jun 21 12:03:19 Thijs-Desktop postfix/postfix-script[30907]: starting the Postfix mail system
Jun 21 12:03:19 Thijs-Desktop postfix/master[30908]: daemon started -- version 2.5.5, configuration /etc/postfix
Jun 21 12:03:20 Thijs-Desktop postfix/qmgr[30920]: 729663E5B7: from=<root@Thijs-Desktop.lan>, size=362, nrcpt=1 (queue active)
Jun 21 12:03:20 Thijs-Desktop postfix/smtp[30943]: warning: connect to private/tlsmgr: No such file or directory
Jun 21 12:03:21 Thijs-Desktop postfix/smtp[30943]: warning: connect to private/tlsmgr: No such file or directory
Jun 21 12:03:21 Thijs-Desktop postfix/smtp[30943]: warning: problem talking to server private/tlsmgr: No such file or directory
Jun 21 12:03:21 Thijs-Desktop postfix/smtp[30943]: warning: no entropy for TLS key generation: disabling TLS support
Jun 21 12:03:21 Thijs-Desktop postfix/smtp[30943]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
Jun 21 12:03:21 Thijs-Desktop postfix/smtp[30943]: 729663E5B7: to=<Thijs.Voncken@xs4all.nl>, relay=none, delay=1765, delays=1764/1/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
Jun 21 12:03:27 Thijs-Desktop clamd[3849]: SelfCheck: Database status OK.
Jun 21 12:03:27 Thijs-Desktop postfix/pickup[30909]: B22E43E5BB: uid=30 from=<wwwrun>
Jun 21 12:03:27 Thijs-Desktop postfix/cleanup[31039]: B22E43E5BB: message-id=<20090621100327.B22E43E5BB@Thijs-Desktop.lan>
Jun 21 12:03:27 Thijs-Desktop postfix/qmgr[30920]: B22E43E5BB: from=<wwwrun@Thijs-Desktop.lan>, size=361, nrcpt=1 (queue active)
Jun 21 12:03:28 Thijs-Desktop postfix/smtp[30943]: B22E43E5BB: to=<Thijs.Voncken@xs4all.nl>, relay=smtp.xs4all.nl[194.109.6.51]:25, delay=0.3, delays=0.07/0/0.2/0.03, dsn=5.1.8, status=bounced (host smtp.xs4all.nl[194.109.6.51] said: 553 5.1.8 <wwwrun@Thijs-Desktop.lan>... Domain of sender address wwwrun@Thijs-Desktop.lan does not exist (in reply to MAIL FROM command))
Jun 21 12:03:28 Thijs-Desktop postfix/cleanup[31039]: 07FD03E5BC: message-id=<20090621100328.07FD03E5BC@Thijs-Desktop.lan>
Jun 21 12:03:28 Thijs-Desktop postfix/qmgr[30920]: 07FD03E5BC: from=<>, size=2359, nrcpt=1 (queue active)
Jun 21 12:03:28 Thijs-Desktop postfix/bounce[31043]: B22E43E5BB: sender non-delivery notification: 07FD03E5BC
Jun 21 12:03:28 Thijs-Desktop postfix/qmgr[30920]: B22E43E5BB: removed
Jun 21 12:03:28 Thijs-Desktop postfix/local[31046]: 07FD03E5BC: to=<root@Thijs-Desktop.lan>, orig_to=<wwwrun@Thijs-Desktop.lan>, relay=local, delay=0.04, delays=0.01/0.01/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox)
Jun 21 12:03:28 Thijs-Desktop postfix/qmgr[30920]: 07FD03E5BC: removed

anyone any idea why this doesn’t work?

Looks like the SMTP server at xs4all.nl checks that the domain you provide in the HELO or EHLO command does really exist. You might have to configure postfix to send a domain that does exist, instead of a fictitious one such as blah-blah.lan.

Bibliotheekn wrote:

> I have my own mailserver at home but it doesn’t work right now because
> my ISP doesn’t let me send mail directly and the relay host doesn’t work
> right now because it is a local domain. Now have I found the
> smtp_generic_maps in the postfix documentation. But I can’t get it to
> work.
>
> I have the following line in my main.cf:
>
> Code:
> --------------------
> smtp_generic_maps=hash:/etc/postfix/smtp_map
> --------------------
>
>
> And this is my smtp_map:
>
> Code:
> --------------------
> @Thijs-Desktop.lan Thijs.Voncken@xs4all.nl
> --------------------

I think you have to use the “generic” file, do not change it :wink:


smtp_generic_maps=hash:/etc/postfix/generic


And make any change there.

Remember to execute “postmap /etc/postfix/generic” after that.

Greetings,


Camaleón

mmm… that thing about the HELO can’t be it, I tested that via telnet. And about the don’t change generic thing, I added the whole line because it wasn’t there. But it’s not my version thats too low. I double checked that. On the other side I didn’t know u had to run postmap. I’ll do that and then report back in.

Aaaaah really thanks guys. The postmap command fixed it :)lol! again… really thanks. My ISP had been complaining about my previous fix because then they got my cronjob mail rotfl!

does anyone know how to mark this thread solved? I can’t find it. Or could a moderator please mark it solved.

You can add the map to the list that will be automatically rehashed in /etc/sysconfig/postfix POSTFIX_MAP_LIST, providing POSTFIX_UPDATE_MAPS is yes. But this only works if you have not manually edited main.cf and only edit /etc/sysconfig/postfix (or use YaST only).

mmm… won’t work then cuz I edited main.cf but i wanna mark this thread as solved, any idea how?

Kindly ask one of the moderators :wink: Users cannot change a thread.