Ryan, glad your sorted,

i tried, but didnt work for me. The /etc/mailname was missing so created
one:
files and config for review
thanks in advance


ubuntu@mail:/etc$ ll mailname
-rw-r--r-- 1 root root 19 Mar  2 20:30 mailname

ubuntu@mail:/etc$ cat /etc/mailname
domain.tld

ubuntu@mail:/etc$ hostname
mail.domain.tld

ubuntu@mail:/etc$ cat /etc/smtpd.conf
listen on localhost
pki mail.domain.tld certificate "/etc/ssl/mail.crt"
pki mail.domain.tld key "/etc/ssl/mail.key"
listen on eth0 port 25 hostname mail.domain.tld tls pki mail.domain.tld
table aliases file:/etc/aliases
table vdomains file:/etc/mail-vdomains
accept from any for domain <vdomains> alias <aliases> deliver to mbox
accept for local alias <aliases> deliver to mbox
accept for any relay as "@domain.tld"


ubuntu@mail:/etc$ host domain.tld
domain.tld has address xx.xx.xx.xx
domain.tld mail is handled by 10 mail.domain.tld.

ubuntu@mail:/etc$ sudo service opensmtpd stop
 * Stopping MTA                                                          [
OK ]
ubuntu@mail:/etc$ sudo service opensmtpd start
 * Starting MTA                                                          [
OK ]

ubuntu@mail:/etc$ mail [email protected]
Cc:
Subject: four
4


however im still get msg from hostname " [email protected] "

does the outbound rule need tweaking ? { accept for any relay as
"@domain.tld" }


-Ludovic



On 3 March 2017 at 04:26, Techmail <[email protected]>
wrote:

> On 03/02/2017 02:40 AM, Gilles Chehade wrote:
>
>> On Thu, Mar 02, 2017 at 01:31:50PM +1000, Ludovic Simpson wrote:
>>
>>>
>>> Gilles, i will try your advice....
>>> ... is the mailname file OS agnostic ?  will this work on ubuntu which
>>> seems to dump everything in /etc  ?
>>>
>>>
>> This depends on packaging, on OpenBSD it is in /etc/mail, I know on some
>> Linux systems the package maintainers prefered to install it in /etc, if
>> I recall correctly the smtpd.conf(5) man page is patched during build to
>> reflect reality of the host system.
>>
>>
>>
> I can confirm "/etc/mailname" is the full path to the file in Ubuntu.
>
>
> On 1 March 2017 at 20:24, Gilles Chehade <[email protected]> wrote:
>>>
>>> On Tue, Feb 28, 2017 at 04:42:02PM -0600, techmail+osmtpd@dangertoaster.
>>>> com wrote:
>>>>
>>>>> I'm working on figuring out how to set the default domain name for
>>>>> emails
>>>>> when the email originates from the localhost.
>>>>>
>>>>
>>>> easiest way is to add an /etc/mail/mailname file with the "local"
>>>> hostname
>>>> of the MX, which can then be overridden with the "hostname" parameter on
>>>> each individual listener.
>>>>
>>>>
>>
> Creating the mailname file did the trick. My config is the same; I just
> needed to add the mailname file.
>
> For Ubuntu:
> $ vim /etc/mailname
> domain.tld
>
> Thanks for the help everyone!
>
> Ryan
>
>
> --
> You received this mail because you are subscribed to [email protected]
> To unsubscribe, send a mail to: [email protected]
>
>

Reply via email to