Re: Please help greenhorn to send email.

2015-11-11 Thread Giovanni Bechis
On 11/11/15 08:13, Mohammad H. Al Shami wrote:
> What I personally do is have a single server in my network able to send 
> emails to the public, and all other servers just relay via that server.
> 
> Makes handling DKIM/SPF/DMARC easier IMHO
> 
you should correctly setup your hostname and you dns then.
At least your hostname should resolve to something.
 Cheers
  Giovanni 

-- 
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: Please help greenhorn to send email.

2015-11-10 Thread Giovanni Bechis
On 11/10/15 11:54, tomaszdro...@interia.eu wrote:
> May I have question about smart host ?
> What is it, how does it work, what do I need, how to configure OPENSMTPD ?
> 
> Is it kind of "relay via" ?
> Do I need some mail account elsewhere for my OPENSMTD to log in ?
> It is hard for me to google out the "idea draft" of smart host)
> 
you should use "relay via" and use an account created by your isp if you do not 
want to send emails directly via your server.
 Cheers
  Giovanni

-- 
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: Please help greenhorn to send email.

2015-11-10 Thread TomaszDrozdz
May I have question about smart host ?
What is it, how does it work, what do I need, how to configure OPENSMTPD ?

Is it kind of "relay via" ?
Do I need some mail account elsewhere for my OPENSMTD to log in ?
It is hard for me to google out the "idea draft" of smart host)

-- 
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



RE: Please help greenhorn to send email.

2015-11-10 Thread Mohammad H. Al Shami
What I personally do is have a single server in my network able to send emails 
to the public, and all other servers just relay via that server.

Makes handling DKIM/SPF/DMARC easier IMHO

-Original Message-
From: Giovanni Bechis [mailto:giova...@paclan.it] 
Sent: Tuesday, November 10, 2015 7:09 PM
To: tomaszdro...@interia.eu
Cc: misc@opensmtpd.org
Subject: Re: Please help greenhorn to send email.

On 11/10/15 11:54, tomaszdro...@interia.eu wrote:
> May I have question about smart host ?
> What is it, how does it work, what do I need, how to configure OPENSMTPD ?
> 
> Is it kind of "relay via" ?
> Do I need some mail account elsewhere for my OPENSMTD to log in ?
> It is hard for me to google out the "idea draft" of smart host)
> 
you should use "relay via" and use an account created by your isp if you do not 
want to send emails directly via your server.
 Cheers
  Giovanni

--
You received this mail because you are subscribed to misc@opensmtpd.org To 
unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: Please help greenhorn to send email.

2015-11-09 Thread Giovanni Bechis
On 11/09/15 17:22, tomaszdro...@interia.eu wrote:
> So You suggest that for example:
> 
> 1)
> My Linux host <---> router <---> ISP
> a) I should have static IP from my ISP and I should own my won domain ?
> 
not necessarily but your hostname(1) should resolve to something; you can 
always use a smart host to send outbound email if you do not have a static ip.
 
> 2)
> My Linux host <---> my company intranet
> a) my company should "allowed my Linux host in company DNS system" ?
> [[ b) this question only by my curiosity because I guess configuring DNS on 
> my Linux host is to much work for me - am I right ?] - and the question is: I 
> could install DNS on my Linux host and dont care about my company DNS system 
> ?]
> 
if your dns is managed by your company, your company should create at least an 
A record for your linux box.
 Cheers
  Giovanni

-- 
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: Please help greenhorn to send email.

2015-10-30 Thread Giovanni Bechis
On 10/30/15 12:25, tomaszdro...@interia.eu wrote:
> Giovanni Bechis" 
>> what is the output of `hostname`, `hostname --fqdn` and `dnsdomainname` ?
>> Your hostname whould be in fqdn format, not just the name of the host.
>>  Cheers
>>Giovanni
>>
> 
> *) hostname
> se-gips
> 
> *) hostname --fqdn
> se-gips
> 
> *) dnsdomainname
> [shows nothing - empty]
> 
As I told you before, set your hostname to something that is resolvable 
(se-gips.interia.eu is in fqdn format but still not resolvable).
 Cheers
  Giovanni

-- 
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: Please help greenhorn to send email.

2015-10-30 Thread Giovanni Bechis
On 10/30/15 11:49, tomaszdro...@interia.eu wrote:
[...]
> 7) cat /etc/hostname 
> se-gips
> 
> 8) cat /etc/resolv.conf
> 
what is the output of `hostname`, `hostname --fqdn` and `dnsdomainname` ?
Your hostname whould be in fqdn format, not just the name of the host.
 Cheers
   Giovanni

-- 
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Please help greenhorn to send email.

2015-10-30 Thread TomaszDrozdz
> Hallo opensmtpd mail list :-)
> 
> I must say that I am "email server" greenhorn.
> I also do not have much experience in net configuration.
> 
> I want to have email server that will allow me to send emails from my linux.
> I search internet (sendmail, qmail, exim, postfix, ...) and luckily found 
> OPENSMTPD :-)
> I have liked it just after seeing one configuration line with: "accept from 
> ...".
> Way of configuring opensmtpd seams to me be modern, simple and easiest of all 
> smtp servers :-)
> 
> As I wrote I am greenhorn and have problem.
> 
> 
> 
> 1) My system info:
> 
> A) I run:
> Operating System: Fedora 21 (Twenty One)
> CPE OS Name: cpe:/o:fedoraproject:fedora:21
> Kernel: Linux 4.1.8-100.fc21.x86_64
> Architecture: x86-64
> 
> on Virtual box.
> 
> B) dnf info opensmtpd
> 
> Name: opensmtpd
> Arch: x86_64
> Version : 5.7.1p1
> Release : 1.fc21
> 
> 2)
> A) iptables --list
> 
> Chain INPUT (policy ACCEPT)
> target prot opt source   destination 
> 
> Chain FORWARD (policy DROP)
> target prot opt source   destination 
> 
> Chain OUTPUT (policy ACCEPT)
> target prot opt source   destination
> 
> B) ip addr
> 
> 1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group default 
> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> inet 127.0.0.1/8 scope host lo
>valid_lft forever preferred_lft forever
> inet6 ::1/128 scope host 
>valid_lft forever preferred_lft forever
> 2: enp0s3:  mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
> link/ether 08:00:27:6f:f9:22 brd ff:ff:ff:ff:ff:ff
> inet 172.29.2.101/19 brd 172.29.31.255 scope global dynamic enp0s3
>valid_lft 570826sec preferred_lft 570826sec
> inet6 fe80::a00:27ff:fe6f:f922/64 scope link 
>valid_lft forever preferred_lft forever
> 6: enp0s11u1:  mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
> link/ether 0c:5b:8f:27:9a:64 brd ff:ff:ff:ff:ff:ff
> inet 192.168.8.100/24 brd 192.168.8.255 scope global dynamic enp0s11u1
>valid_lft 52421sec preferred_lft 52421sec
> inet6 fe80::e5b:8fff:fe27:9a64/64 scope link 
>valid_lft forever preferred_lft forever
> 
> 3) My opensmtp:
> 
> A) /etc/opensmtpd/smtpd.conf
> 
> listen on lo
> listen on enp0s3
> listen on enp0s11u1
> 
> accept from local for any relay
> 
> expire 4h
> 
> B) ls -laZ /var/log/maillog 
> -rw---. root root system_u:object_r:var_log_t:s0   /var/log/maillog
> 
> C) ps -ef|grep smtpd
> 
> root 11410 1  0 11:44 ?00:00:00 smtpd: [priv]
> smtpq11411 11410  0 11:44 ?00:00:00 smtpd: queue
> smtpd11412 11410  0 11:44 ?00:00:00 smtpd: control
> smtpd11413 11410  0 11:44 ?00:00:00 smtpd: lookup
> smtpd11414 11410  0 11:44 ?00:00:00 smtpd: scheduler
> smtpd11415 11410  0 11:44 ?00:00:00 smtpd: pony express
> smtpd11416 11410  0 11:44 ?00:00:00 smtpd: klondike
> 
> 4) mailx -s "hello" "tomaszdro...@interia.eu"
> 
> 5) Problems
> 
> A) sudo smtpctl show queue
> 
> c823c60ac80192be|local|mta|auth|@|tomek@se-gips|tomek@se-gips|1446115579|1446461179|0|8|invalid||Temporary
>  failure in MX lookup
> 
> B) /var/log/maillog
> is empty
> 
> Why I can not send email ?
> Why log file is empty ?



Thank you all for reply.
I give more info:

6)
A) dig interia.eu mx

; <<>> DiG 9.9.6-P1-RedHat-9.9.6-11.P1.fc21 <<>> interia.eu mx
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19493
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 2

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;interia.eu.IN  MX

;; ANSWER SECTION:
interia.eu. 27964   IN  MX  5 mx.interia.pl.

;; ADDITIONAL SECTION:
mx.interia.pl.  3282IN  A   217.74.65.64

;; Query time: 2 msec
;; SERVER: 172.29.1.9#53(172.29.1.9)
;; WHEN: Fri Oct 30 09:49:00 CET 2015
;; MSG SIZE  rcvd: 84

B) host interia.eu

interia.eu has address 217.74.65.52
interia.eu mail is handled by 5 mx.interia.pl.

C) nslookup interia.eu

Server: 172.29.1.9
Address:172.29.1.9#53

Non-authoritative answer:
Name:   interia.eu
Address: 217.74.65.52

7) cat /etc/hostname 
se-gips

8) cat /etc/resolv.conf

search my_company_domain_name.pl
 
nameserver 172.29.1.9
nameserver 208.67.222.222
nameserver 8.8.8.8
#nameserver 192.168.8.1
# NOTE: the libc resolver may not support more than 3 nameservers.
# The nameservers listed below may not be recognised.
nameserver 208.67.220.220
nameserver 208.67.222.220
nameserver 208.67.220.222
nameserver 8.8.4.4
nameserver 172.29.1.10
nameserver 172.29.1.11
nameserver 10.98.160.70
nameserver 10.98.160.71

9)
A) cat /etc/sysconfig/network-scripts/ifcfg-lo 

DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
# If you're having problems with gated making 

Re: Please help greenhorn to send email.

2015-10-30 Thread TomaszDrozdz
Giovanni Bechis" 
> what is the output of `hostname`, `hostname --fqdn` and `dnsdomainname` ?
> Your hostname whould be in fqdn format, not just the name of the host.
>  Cheers
>Giovanni
> 

*) hostname
se-gips

*) hostname --fqdn
se-gips

*) dnsdomainname
[shows nothing - empty]

-- 
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Please help greenhorn to send email.

2015-10-29 Thread tomaszdrozdz
Hallo opensmtpd mail list :-)

I must say that I am "email server" greenhorn.
I also do not have much experience in net configuration.

I want to have email server that will allow me to send emails from my linux.
I search internet (sendmail, qmail, exim, postfix, ...) and luckily found 
OPENSMTPD :-)
I have liked it just after seeing one configuration line with: "accept from 
...".
Way of configuring opensmtpd seams to me be modern, simple and easiest of all 
smtp servers :-)

As I wrote I am greenhorn and have problem.



1) My system info:

A) I run:
Operating System: Fedora 21 (Twenty One)
CPE OS Name: cpe:/o:fedoraproject:fedora:21
Kernel: Linux 4.1.8-100.fc21.x86_64
Architecture: x86-64

on Virtual box.

B) dnf info opensmtpd

Name: opensmtpd
Arch: x86_64
Version : 5.7.1p1
Release : 1.fc21

2)
A) iptables --list

Chain INPUT (policy ACCEPT)
target prot opt source   destination 

Chain FORWARD (policy DROP)
target prot opt source   destination 

Chain OUTPUT (policy ACCEPT)
target prot opt source   destination

B) ip addr

1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group 
default 
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
   valid_lft forever preferred_lft forever
inet6 ::1/128 scope host 
   valid_lft forever preferred_lft forever
2: enp0s3:  mtu 1500 qdisc pfifo_fast state UP 
group default qlen 1000
link/ether 08:00:27:6f:f9:22 brd ff:ff:ff:ff:ff:ff
inet 172.29.2.101/19 brd 172.29.31.255 scope global dynamic enp0s3
   valid_lft 570826sec preferred_lft 570826sec
inet6 fe80::a00:27ff:fe6f:f922/64 scope link 
   valid_lft forever preferred_lft forever
6: enp0s11u1:  mtu 1500 qdisc pfifo_fast state 
UNKNOWN group default qlen 1000
link/ether 0c:5b:8f:27:9a:64 brd ff:ff:ff:ff:ff:ff
inet 192.168.8.100/24 brd 192.168.8.255 scope global dynamic enp0s11u1
   valid_lft 52421sec preferred_lft 52421sec
inet6 fe80::e5b:8fff:fe27:9a64/64 scope link 
   valid_lft forever preferred_lft forever

3) My opensmtp:

A) /etc/opensmtpd/smtpd.conf

listen on lo
listen on enp0s3
listen on enp0s11u1

accept from local for any relay

expire 4h

B) ls -laZ /var/log/maillog 
-rw---. root root system_u:object_r:var_log_t:s0   /var/log/maillog

C) ps -ef|grep smtpd

root 11410 1  0 11:44 ?00:00:00 smtpd: [priv]
smtpq11411 11410  0 11:44 ?00:00:00 smtpd: queue
smtpd11412 11410  0 11:44 ?00:00:00 smtpd: control
smtpd11413 11410  0 11:44 ?00:00:00 smtpd: lookup
smtpd11414 11410  0 11:44 ?00:00:00 smtpd: scheduler
smtpd11415 11410  0 11:44 ?00:00:00 smtpd: pony express
smtpd11416 11410  0 11:44 ?00:00:00 smtpd: klondike

4) mailx -s "hello" "tomaszdro...@interia.eu"

5) Problems

A) sudo smtpctl show queue

c823c60ac80192be|local|mta|auth|@|tomek@se-gips|tomek@se-gips|1446115579|1446461179|0|8|invalid||Temporary
 failure in MX lookup

B) /var/log/maillog
is empty

Why I can not send email ?
Why log file is empty ?


Please help if you can.
If you need more information I will provide it.

-- 
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: Please help greenhorn to send email.

2015-10-29 Thread Giovanni Bechis
tomaszdro...@interia.eu ha scritto:
>Hallo opensmtpd mail list :-)
>
>I must say that I am "email server" greenhorn.
>I also do not have much experience in net configuration.
>
>I want to have email server that will allow me to send emails from my
>linux.
>I search internet (sendmail, qmail, exim, postfix, ...) and luckily
>found OPENSMTPD :-)
>I have liked it just after seeing one configuration line with: "accept
>from ...".
>Way of configuring opensmtpd seams to me be modern, simple and easiest
>of all smtp servers :-)
>
>As I wrote I am greenhorn and have problem.
>
>
>
>1) My system info:
>
>A) I run:
>Operating System: Fedora 21 (Twenty One)
>CPE OS Name: cpe:/o:fedoraproject:fedora:21
>Kernel: Linux 4.1.8-100.fc21.x86_64
>Architecture: x86-64
>
>on Virtual box.
>
>B) dnf info opensmtpd
>
>Name: opensmtpd
>Arch: x86_64
>Version : 5.7.1p1
>Release : 1.fc21
>
>2)
>A) iptables --list
>
>Chain INPUT (policy ACCEPT)
>target prot opt source   destination 
>
>Chain FORWARD (policy DROP)
>target prot opt source   destination 
>
>Chain OUTPUT (policy ACCEPT)
>target prot opt source   destination
>
>B) ip addr
>
>1: lo:  mtu 65536 qdisc noqueue state UNKNOWN
>group default 
>link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>inet 127.0.0.1/8 scope host lo
>   valid_lft forever preferred_lft forever
>inet6 ::1/128 scope host 
>   valid_lft forever preferred_lft forever
>2: enp0s3:  mtu 1500 qdisc pfifo_fast
>state UP group default qlen 1000
>link/ether 08:00:27:6f:f9:22 brd ff:ff:ff:ff:ff:ff
>inet 172.29.2.101/19 brd 172.29.31.255 scope global dynamic enp0s3
>   valid_lft 570826sec preferred_lft 570826sec
>inet6 fe80::a00:27ff:fe6f:f922/64 scope link 
>   valid_lft forever preferred_lft forever
>6: enp0s11u1:  mtu 1500 qdisc
>pfifo_fast state UNKNOWN group default qlen 1000
>link/ether 0c:5b:8f:27:9a:64 brd ff:ff:ff:ff:ff:ff
> inet 192.168.8.100/24 brd 192.168.8.255 scope global dynamic enp0s11u1
>   valid_lft 52421sec preferred_lft 52421sec
>inet6 fe80::e5b:8fff:fe27:9a64/64 scope link 
>   valid_lft forever preferred_lft forever
>
>3) My opensmtp:
>
>A) /etc/opensmtpd/smtpd.conf
>
>listen on lo
>listen on enp0s3
>listen on enp0s11u1
>
>accept from local for any relay
>
>expire 4h
>
>B) ls -laZ /var/log/maillog 
>-rw---. root root system_u:object_r:var_log_t:s0   /var/log/maillog
>
>C) ps -ef|grep smtpd
>
>root 11410 1  0 11:44 ?00:00:00 smtpd: [priv]
>smtpq11411 11410  0 11:44 ?00:00:00 smtpd: queue
>smtpd11412 11410  0 11:44 ?00:00:00 smtpd: control
>smtpd11413 11410  0 11:44 ?00:00:00 smtpd: lookup
>smtpd11414 11410  0 11:44 ?00:00:00 smtpd: scheduler
>smtpd11415 11410  0 11:44 ?00:00:00 smtpd: pony express
>smtpd11416 11410  0 11:44 ?00:00:00 smtpd: klondike
>
>4) mailx -s "hello" "tomaszdro...@interia.eu"
>
>5) Problems
>
>A) sudo smtpctl show queue
>
>c823c60ac80192be|local|mta|auth|@|tomek@se-gips|tomek@se-gips|1446115579|1446461179|0|8|invalid||Temporary
>failure in MX lookup
>
>B) /var/log/maillog
>is empty
>
>Why I can not send email ?
>Why log file is empty ?
>
>
>Please help if you can.
>If you need more information I will provide it.

Your  server cannot resolve se-gips domain, check your host name and your 
resolver configuration. 
  Cheers
 Giovanni

-- 
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: Please help greenhorn to send email.

2015-10-29 Thread Raf Czlonka
On Thu, Oct 29, 2015 at 04:43:55PM GMT, tomaszdro...@interia.eu wrote:
> Hallo opensmtpd mail list :-)

Hi Tomasz,

You already received an answer to your main question, I'll just comment
on some of our configuration.

> I must say that I am "email server" greenhorn.

Could you be more specific, please? What do you mean by "email server"?
Do you want to use it only to send mail or receive, too?

> I have liked it just after seeing one configuration line with: "accept
> from ...". Way of configuring opensmtpd seams to me be modern, simple
> and easiest of all smtp servers :-)

I very much agree with you here here - well, I think we all, on this
mailing list, do ;^)

> B) ip addr
> 
> 1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group 
> default 
> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> inet 127.0.0.1/8 scope host lo
>valid_lft forever preferred_lft forever
> inet6 ::1/128 scope host 
>valid_lft forever preferred_lft forever
> 2: enp0s3:  mtu 1500 qdisc pfifo_fast state 
> UP group default qlen 1000
> link/ether 08:00:27:6f:f9:22 brd ff:ff:ff:ff:ff:ff
> inet 172.29.2.101/19 brd 172.29.31.255 scope global dynamic enp0s3
>valid_lft 570826sec preferred_lft 570826sec
> inet6 fe80::a00:27ff:fe6f:f922/64 scope link 
>valid_lft forever preferred_lft forever
> 6: enp0s11u1:  mtu 1500 qdisc pfifo_fast 
> state UNKNOWN group default qlen 1000
> link/ether 0c:5b:8f:27:9a:64 brd ff:ff:ff:ff:ff:ff
> inet 192.168.8.100/24 brd 192.168.8.255 scope global dynamic enp0s11u1
>valid_lft 52421sec preferred_lft 52421sec
> inet6 fe80::e5b:8fff:fe27:9a64/64 scope link 
>valid_lft forever preferred_lft forever
> 
> 3) My opensmtp:
> 
> A) /etc/opensmtpd/smtpd.conf
> 
> listen on lo
> listen on enp0s3
> listen on enp0s11u1
> 
> accept from local for any relay

If the answer to the above question is "only sent mail from that VM", a
more appropriate configuration would be:

listen on lo

If you are in fact planning on receiving mail on that machine, you can
shorten the above to:

listen on all

You can also limit the listening to inet4 or inet6 family of addresses
if you wish to.

Regards,

Raf

-- 
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org