Re: OpenBSD 6.4 smtpd local mail delivery missing "From " when .forward (procmail)

2019-01-27 Thread Gilles Chehade
On Sun, Jan 27, 2019 at 12:42:23PM -0700, Steve Williams wrote:
> 
> Hi Gilles,
> 
> Thanks very much for the reply.?? I had looked in for some kind of flag that
> could be set in the procmail config file... I never thought it would be a
> command line argument to procmail :(?? I cannot believe I missed that.
> 
> I had even downloaded the smtpd source and saw that mail.local could only
> write to a file (not a stream)... and that's the only place in the source
> code where a "From " was written so I knew it wasn't going to be a smtpd
> configuration change.
> 
> Do you think a hint about the behaviour change might be worth a mention in
> the smptd.conf (5) man page??? I've been trying to come up with some
> non-procmail specific wording...I am not happy with the following wording,
> but something along these lines to give a clue that piping to a program
> won't have the same effect as writing to a physical file.
> 
>  mbox?? Deliver the message to the user's mbox 
> with
>  mail.local(8).?? mbox format is
> only honoured if final delivery is a file and not a program.
> ^^^
>

this isn't accurate, smtpd(8) doesn't write to a file.

smtpd doesn't know about an "mbox format", what it does is that it calls
mail.local(8) which is an mda that should really be called mail.mbox and
which itself writes to a file in mbox format.

I don't think its necessary to document this behaviour in smtpd.conf(5),
procmail is the only case I know where you may forget to pass the option
and be bit, which leads to threads like this where i'm given a chance to
discourage you from using procmail.
k

> Thanks for the heads up about fdm.?? I'll have a look at it.
> 
> Also, thanks for such an amazingly simple email program to configure.?? I
> have spent so many hours over the years researching (scratching my head) how
> to configure sendmail!?? A 4 line config file to have a functioning email
> configuration is pretty staggering!
> 

Cheers :-)


-- 
Gilles Chehade @poolpOrg

https://www.poolp.org tip me: https://paypal.me/poolpOrg



Re: Is a commercial wireless router a security risk if it is behind an OpenBSD router with pf?

2019-01-27 Thread Judah Kocher
I was in the same position about 18 months ago when I reached the 
conclusion that I didn't trust my RT-AC88U. I spent about a month 
teaching myself iptables before learning about OpenBSD and PF and never 
looked back. I have read and reread OpenBSD for Dummies and The Book of 
PF multiple times, and spent many an hour on the OpenBSD website as well 
as lurking on this mailing list filling in holes from outdated material.

I am using a mini PC from Qotom for my router and I took an old D-Link 
router, set it to AP mode, disabled the DHCP server and connected it to 
one NIC on it's own subnet as guest wifi. All traffic not heading to the 
internet is blocked so guests never even see my network. {And thanks to 
queuing, which I finally figured out, they have no idea how fast my 
internet speed actually is :) } For the ASUS unit, like you I wasn't 
willing to give up the wifi speeds so I set it to AP mode, disabled the 
DHCP server, and am using dhcpd address reservation on the Router to 
assign it an address that I block in the firewall.

Any devices connected to it have their own IPs that pass through just 
fine, but traffic originating from the router itself gets nowhere. I did 
a factory reset and flashed the latest Merlin Firmware when I made this 
change and it has never been exposed to the internet since. Even if it 
does get compromised somehow I believe this should keep it from phoning 
home or otherwise causing meaningful harm.

The only "issue" is that I can't automatically update firmware. That 
seems to me the lesser of evils. I check fairly regularly for updates 
and can easily update it manually when required and I think this setup 
also makes running older firmware a bit less of a liability.

Good luck!

Judah



On 1/24/19 5:55 PM, John Page wrote:
> This is my first attempt at a router. Liberally borrowing from tutorials
> and reading Absolute OpenBSD, 2nd Edition and Building Linux and OpenBSD
> Firewalls, I decided on installing OpenBSD 6.4 on a PC Engines apu4. I
> had previously been using an Asus RT-86U as both my router and wireless
> access point. The apu4 can have wireless capability, but OpenBSD does
> not support 802.11ac while the Asus does. So I decided to connect the
> Asus to em3 of the apu4 so my wireless Windows 10 computers (both of
> which have .ac) and Android phones could connect to the Asus instead of
> the apu4 main router. Below is my stab at a network diagram (borrowed
> and adapted) and the contents of my configuration files (again, borrowed
> and adapted).
>
> My question is: OK, I understand that people more knowledgeable than I
> am say that  commercially available consumer-grade routers are not
> secure. However, will I still have security risks associated with using
> the Asus router when it is behind the OpenBSD/apu4 router?
> Also, any suggestions or comments would be appreciated.
> Thanks
> John
> apu4 router (running OpenBSD 6.4 -stable)
>     --→
>     the internal interface
> .-.---.
> | |   em3 | -→ Asus router -→ Windows 10 and
> |   bridge0   | (no ip)   |    (RT-AC86U) Android clients
> | '---'
> | |   em2 | static (fixed) via MAC address
>
> '--.  | (no ip)   | -→ 192.168.1.3 OpenBSD only
> |   vether0    |  '---'
> |    dhcpd |  |   em1 | static (fixed) via MAC address
>
> | 192.168.1.1  |  | (no ip)   | -→ 192.168.1.2 OpenBSD only
> '---^--'--'---'
>    |
>    v
>   em0
>  dhcp
>   ^
>   |
> Arris Surfboard SB8200
> Cable Modem DOCSIS 3.1
> (external interface)
>   |
>   v
>   .-,( ),-.
> -( )-.
> (   Internet   )
> '-(   ).-'
>  '--.( ).'
> _/etc_/hostname.bridge0
> add vether0
> add em1
> add em2
> add em3
> blocknonip vether0
> blocknonip em1
> blocknonip em2
> blocknonip em3
> up
> _/etc_/hostname.vether0
> inet 192.168.1.1 255.255.255.0 192.168.1.255
> _/etc/dhcpd.conf_
> option domain-names-servers 192.168.1.1;
> subnet 192.168.1.0 netmask 255.255.255.0 {
> option routers 192.168.1.1;
> range 192.168.1.4 192.168.1.254;
> host x1carbon {
> fixed-address 192.168.1.2;
> hardware ethernet xx:xx:xx:xx:xx:xx;
> }
> host optiplex790 {
> fixed-address 192.168.1.3;
> hardware ethernet xx:xx:xx:xx:xx:xx;
> }
> }
> _/var/unbound/etc/unbound.conf_
> server:
> interface: 192.168.1.1
> interface: 127.0.0.1
> do-ip6: no
> access-control: 192.168.1.0/24 allow
> do-not-query-localhost: no
> hide-identity: yes
> hide-version: yes
> forward-zone:
> name: "."
> forward-addr: 127.0.0.1@40
> _/etc/rc.conf.local_
> dhcpd_flags="vether0"
> unbound_flags=""
> dnscrypt_proxy
> dnscrypt_proxy_flags="-l /_dev/_null -R dnscrypt.ca-1 -a 127.0.0.1:40"
> sndiod_flags=NO
> apmd_flags="-A"
> _/etc/dhclient.conf_
> ignore domain-name-servers
> /etc/fstab (this is the only change from the default)
>
> 

Re: bsd.mp doesn't boot

2019-01-27 Thread Mike Larkin
On Sun, Jan 27, 2019 at 07:26:00AM -0700, hdrozdow wrote:
> I think I have come to conclusion too fast.
> After second reboot (when firmware and binary patches are installed)
> the boot is stuck at the same place. 
> Someone asked if I am booting /bsd - yes.
> 
> Here is a diff between 6.3 (first reboot .mp) and 6.4 (posted earlier
> (.sp)).

Since 6.3 worked and 6.4 did not, and you can still use 6.3 to build a kernel,
I would suggest you start bisecting to find the problem commit and let us
know what it was.

-ml



Re: apu2 em0/dhclient problems

2019-01-27 Thread Steve Williams

On 27/01/2019 1:44 p.m., Edgar Pettijohn wrote:

On Sun, Jan 27, 2019 at 09:34:54PM +0100, Mikkel C. Simonsen wrote:

Den 27-01-2019 kl. 19:45 skrev trondd:

On Sun, January 27, 2019 12:44 pm, Edgar Pettijohn wrote:

I'm trying to replace my dieing soekris box with an apu2 dmesg below.
However, I can't seem to get em0 to connect to my isp. It will work
when connecting to the soekris box though. So I don't think its the
interface that is the problem. But everything I try seems to rule out
eachother as the problem, leaving me in a viscious cycle.

I'm going to try disabling pf and after that current. If you have
any other suggestions please send them.

Thanks,

edgar

Does your ISP whitelist by MAC address?

My ISP locks the connection to a certain MAC for a number of hours. Tech
support can probably delete the old lease.

Best regards,

Mikkel


I don't think this is the case. I was able to connect directly to my laptop and
get a lease immediately.  Its odd... With base dhclient it goes something like:

em0 no link
em0. got link

and then nothing.

I installed isc-dhcp-client and it actually goes through the steps of the whole
DHCPDISCOVER...etc,etc. Unfortunantly it still ends with me not having a 
connection.
I doubt it will do anything, but I'm going to try updating the bios. Sort of 
like
checking the oil when the problem is a flat tire, but who knows.

Thanks,

edgar

Hi,

I just upgraded my APU2 yesterday and have no problems with my dhcp.  I 
have a cable internet connection through my ISP.


Do you have a /etc/dhclient.conf file?  I do not.

Perhaps try killing dhclient, then run it in debugging mode in the 
foreground.


/sbin/dhclient -i em0 -d -v

See what happens.

My /etc/hostname.em0 just has "dhcp" in it.

Here's some information from my system:

OpenBSD 6.4 (GENERIC.MP) #364: Thu Oct 11 13:30:23 MDT 2018
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4261072896 (4063MB)
avail mem = 4122664960 (3931MB)

bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdffb7020 (7 entries)
bios0: vendor coreboot version "88a4f96" date 03/07/2016
bios0: PC Engines apu2

em0 at pci1 dev 0 function 0 "Intel I210" rev 0x03: msi, address 
00:0d:b9:44:62:7c


pcengine# ifconfig em0
em0: flags=8843 mtu 1500
    lladdr 00:0d:b9:44:62:7c
    index 1 priority 0 llprio 3
    groups: egress
    media: Ethernet autoselect (1000baseT full-duplex,master)
    status: active
    inet a.b.c.d netmask 0xffc0 broadcast a.b.c.something

You might also try running tcpdump while the dhcp is going on and watch 
the packet trace.  At a minimum, you could post the packet trace here 
for imput.


tcpdump -i em0

Cheers,
Steve W.





Re: apu2 em0/dhclient problems

2019-01-27 Thread Mikkel C. Simonsen

Den 27-01-2019 kl. 19:45 skrev trondd:

On Sun, January 27, 2019 12:44 pm, Edgar Pettijohn wrote:

I'm trying to replace my dieing soekris box with an apu2 dmesg below.
However, I can't seem to get em0 to connect to my isp. It will work
when connecting to the soekris box though. So I don't think its the
interface that is the problem. But everything I try seems to rule out
eachother as the problem, leaving me in a viscious cycle.

I'm going to try disabling pf and after that current. If you have
any other suggestions please send them.

Thanks,

edgar


Does your ISP whitelist by MAC address?


My ISP locks the connection to a certain MAC for a number of hours. Tech 
support can probably delete the old lease.


Best regards,

Mikkel



Re: apu2 em0/dhclient problems

2019-01-27 Thread Edgar Pettijohn
On Sun, Jan 27, 2019 at 09:34:54PM +0100, Mikkel C. Simonsen wrote:
> Den 27-01-2019 kl. 19:45 skrev trondd:
> > On Sun, January 27, 2019 12:44 pm, Edgar Pettijohn wrote:
> > > I'm trying to replace my dieing soekris box with an apu2 dmesg below.
> > > However, I can't seem to get em0 to connect to my isp. It will work
> > > when connecting to the soekris box though. So I don't think its the
> > > interface that is the problem. But everything I try seems to rule out
> > > eachother as the problem, leaving me in a viscious cycle.
> > > 
> > > I'm going to try disabling pf and after that current. If you have
> > > any other suggestions please send them.
> > > 
> > > Thanks,
> > > 
> > > edgar
> > 
> > Does your ISP whitelist by MAC address?
> 
> My ISP locks the connection to a certain MAC for a number of hours. Tech
> support can probably delete the old lease.
> 
> Best regards,
> 
> Mikkel
>

I don't think this is the case. I was able to connect directly to my laptop and
get a lease immediately.  Its odd... With base dhclient it goes something like:

em0 no link
em0. got link

and then nothing.

I installed isc-dhcp-client and it actually goes through the steps of the whole
DHCPDISCOVER...etc,etc. Unfortunantly it still ends with me not having a 
connection.
I doubt it will do anything, but I'm going to try updating the bios. Sort of 
like
checking the oil when the problem is a flat tire, but who knows.

Thanks,

edgar 



Re: OpenBSD 6.4 smtpd local mail delivery missing "From " when .forward (procmail)

2019-01-27 Thread Steve Williams

On 27/01/2019 2:21 a.m., Gilles Chehade wrote:

On Sat, Jan 26, 2019 at 08:53:06PM -0700, Steve Williams wrote:

Hi,

I upgraded from OpenBSD 6.3 to OpenBSD 6.4 today.?? I upgraded all packages,
switched to php7, etc.

I've been running OpenBSD since 2.7 so this is a very known process.

The upgrade went quite smoothly and is working fine except for my email.?? I
have massaged the smtpd.conf file to comply with the OpenBSD 6.4 grammar.

I run a VERY simple smtpd configuration saving in mbox format.

I am also using procmail to direct emails into various folders, launched
with a .forward.?? This has been working since about 2005 :), historically
with sendmail and more recently, smtpd.

Unfortunately, email is being written to both my INBOX and the procmail the
folders **incorrectly** post upgrade.

They are all missing the "From " line that is supposed to indicate the start
of a new email message.

It seems like the email is being passed "raw" to procmail without being
processed by "mail.local" ... or that's my interpretation.


you need to tweak your procmail's command so it adds the From delimiter,
there's an option for that.

smtpd used to add the From delimiter for mda, which allowed procmail not
to require that option, however this wasn't correct and when we made the
mda improvements between 6.3 and 6.4, it became impossible to accomodate
procmail without introducing special cases and ugly hacks such as having
explicit search for the string 'procmail' in .forward files.

it wasn't worth it when people can just pass procmail an option.

also don't use procmail, it's trash and there are far better options for
you to use today, fdm being the first to come to mind :-)



Hi Gilles,

Thanks very much for the reply.  I had looked in for some kind of flag 
that could be set in the procmail config file... I never thought it 
would be a command line argument to procmail :(  I cannot believe I 
missed that.


I had even downloaded the smtpd source and saw that mail.local could 
only write to a file (not a stream)... and that's the only place in the 
source code where a "From " was written so I knew it wasn't going to be 
a smtpd configuration change.


Do you think a hint about the behaviour change might be worth a mention 
in the smptd.conf (5) man page?  I've been trying to come up with some 
non-procmail specific wording...I am not happy with the following 
wording, but something along these lines to give a clue that piping to a 
program won't have the same effect as writing to a physical file.


 mbox    Deliver the message to the user's mbox with
 mail.local(8).  mbox format is only honoured if 
final delivery is a file and not a program.

^^^

Thanks for the heads up about fdm.  I'll have a look at it.

Also, thanks for such an amazingly simple email program to configure.  I 
have spent so many hours over the years researching (scratching my head) 
how to configure sendmail!  A 4 line config file to have a functioning 
email configuration is pretty staggering!


Cheers,
Steve W.



Re: apu2 em0/dhclient problems

2019-01-27 Thread trondd
On Sun, January 27, 2019 12:44 pm, Edgar Pettijohn wrote:
> I'm trying to replace my dieing soekris box with an apu2 dmesg below.
> However, I can't seem to get em0 to connect to my isp. It will work
> when connecting to the soekris box though. So I don't think its the
> interface that is the problem. But everything I try seems to rule out
> eachother as the problem, leaving me in a viscious cycle.
>
> I'm going to try disabling pf and after that current. If you have
> any other suggestions please send them.
>
> Thanks,
>
> edgar

Does your ISP whitelist by MAC address?


>
> OpenBSD 6.4 (GENERIC.MP) #364: Thu Oct 11 13:30:23 MDT 2018
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 1996152832 (1903MB)
> avail mem = 1926434816 (1837MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.7 @ 0x77fb7020 (7 entries)
> bios0: vendor coreboot version "4.0.7" date 02/28/2017
> bios0: PC Engines APU2
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S1 S2 S3 S4 S5
> acpi0: tables DSDT FACP SSDT APIC HEST SSDT SSDT HPET
> acpi0: wakeup devices PWRB(S4) PBR4(S4) PBR5(S4) PBR6(S4) PBR7(S4)
> PBR8(S4) UOH1(S3) UOH3(S3) UOH5(S3) XHC0(S4)
> acpitimer0 at acpi0: 3579545 Hz, 32 bits
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: AMD GX-412TC SOC, 998.27 MHz, 16-30-01
> cpu0:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
> cpu0: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB
> 64b/line 16-way L2 cache
> cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully
> associative
> cpu0: DTLB 40 4KB entries fully associative, 8 4MB entries fully
> associative
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> cpu0: apic clock running at 99MHz
> cpu0: mwait min=64, max=64, IBE
> cpu1 at mainbus0: apid 1 (application processor)
> cpu1: AMD GX-412TC SOC, 998.13 MHz, 16-30-01
> cpu1:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
> cpu1: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB
> 64b/line 16-way L2 cache
> cpu1: ITLB 32 4KB entries fully associative, 8 4MB entries fully
> associative
> cpu1: DTLB 40 4KB entries fully associative, 8 4MB entries fully
> associative
> cpu1: smt 0, core 1, package 0
> cpu2 at mainbus0: apid 2 (application processor)
> cpu2: AMD GX-412TC SOC, 998.13 MHz, 16-30-01
> cpu2:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
> cpu2: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB
> 64b/line 16-way L2 cache
> cpu2: ITLB 32 4KB entries fully associative, 8 4MB entries fully
> associative
> cpu2: DTLB 40 4KB entries fully associative, 8 4MB entries fully
> associative
> cpu2: smt 0, core 2, package 0
> cpu3 at mainbus0: apid 3 (application processor)
> cpu3: AMD GX-412TC SOC, 998.13 MHz, 16-30-01
> cpu3:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
> cpu3: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB
> 64b/line 16-way L2 cache
> cpu3: ITLB 32 4KB entries fully associative, 8 4MB entries fully
> associative
> cpu3: DTLB 40 4KB entries fully associative, 8 4MB entries fully
> associative
> cpu3: smt 0, core 3, package 0
> ioapic0 at mainbus0: apid 4 pa 0xfec0, version 21, 24 pins
> ioapic1 at mainbus0: apid 5 pa 0xfec2, version 21, 32 pins, remapped
> acpihpet0 at acpi0: 14318180 Hz
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus -1 (PBR4)
> acpiprt2 at acpi0: bus 1 (PBR5)
> acpiprt3 at acpi0: bus 2 (PBR6)
> acpiprt4 at acpi0: bus 3 (PBR7)
> acpiprt5 at acpi0: bus 4 (PBR8)
> acpicpu0 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS
> acpicpu1 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS
> acpicpu2 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS
> acpicpu3 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS
> acpibtn0 at 

Re: bsd.mp doesn't boot

2019-01-27 Thread hdrozdow
I think I have come to conclusion too fast.
After second reboot (when firmware and binary patches are installed)
the boot is stuck at the same place. 
Someone asked if I am booting /bsd - yes.

Here is a diff between 6.3 (first reboot .mp) and 6.4 (posted earlier
(.sp)).
1,2c1,2
< OpenBSD 6.3 (RAMDISK_CD) #98: Sat Mar 24 14:26:39 MDT 2018
< dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
---
> OpenBSD 6.4 (GENERIC) #349: Thu Oct 11 13:25:13 MDT 2018
> [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC
4,135c4
< avail mem = 8223703040 (7842MB)
< mainbus0 at root
< bios0 at mainbus0: SMBIOS rev. 3.0 @ 0x67ee7000 (43 entries)
< bios0: vendor American Megatrends Inc. version "1.05.13" date 04/01/2016
< bios0: Dream Machines N15_17RD,RD2
< acpi0 at bios0: rev 2
< acpi0: tables DSDT FACP APIC FPDT FIDT MCFG HPET SSDT SSDT DBGP DBG2 SSDT
UEFI SSDT SSDT DMAR SSDT ASF!
< acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
< cpu0 at mainbus0: apid 0 (boot processor)
< cpu0: Intel(R) Core(TM) i5-6300HQ CPU @ 2.30GHz, 2794.66 MHz
< cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT,MELTDOWN
< cpu0: 256KB 64b/line 8-way L2 cache
< cpu0: apic clock running at 23MHz
< cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
< cpu at mainbus0: not configured
< cpu at mainbus0: not configured
< cpu at mainbus0: not configured
< ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 120 pins
< acpiprt0 at acpi0: bus 0 (PCI0)
< acpiprt1 at acpi0: bus 1 (PEG0)
< acpiprt2 at acpi0: bus -1 (PEG1)
< acpiprt3 at acpi0: bus -1 (PEG2)
< acpiprt4 at acpi0: bus -1 (RP17)
< acpiprt5 at acpi0: bus -1 (RP18)
< acpiprt6 at acpi0: bus -1 (RP19)
< acpiprt7 at acpi0: bus -1 (RP20)
< acpiprt8 at acpi0: bus 2 (RP01)
< acpiprt9 at acpi0: bus -1 (RP02)
< acpiprt10 at acpi0: bus 3 (RP03)
< acpiprt11 at acpi0: bus 4 (RP04)
< acpiprt12 at acpi0: bus -1 (RP05)
< acpiprt13 at acpi0: bus -1 (RP06)
< acpiprt14 at acpi0: bus -1 (RP07)
< acpiprt15 at acpi0: bus -1 (RP08)
< acpiprt16 at acpi0: bus -1 (RP09)
< acpiprt17 at acpi0: bus -1 (RP10)
< acpiprt18 at acpi0: bus -1 (RP11)
< acpiprt19 at acpi0: bus -1 (RP12)
< acpiprt20 at acpi0: bus -1 (RP13)
< acpiprt21 at acpi0: bus -1 (RP14)
< acpiprt22 at acpi0: bus -1 (RP15)
< acpiprt23 at acpi0: bus -1 (RP16)
< acpiec0 at acpi0
< acpicpu at acpi0 not configured
< acpipwrres at acpi0 not configured
< acpipwrres at acpi0 not configured
< acpipwrres at acpi0 not configured
< acpipwrres at acpi0 not configured
< acpitz at acpi0 not configured
< "INT3F0D" at acpi0 not configured
< "MSFT0001" at acpi0 not configured
< "SYN1218" at acpi0 not configured
< "PNP0C14" at acpi0 not configured
< "INT33A1" at acpi0 not configured
< "PNPC000" at acpi0 not configured
< "PNP0C0C" at acpi0 not configured
< "PNP0C0E" at acpi0 not configured
< "PNP0C0D" at acpi0 not configured
< "ACPI0003" at acpi0 not configured
< "PNP0C0A" at acpi0 not configured
< "PNP0C14" at acpi0 not configured
< "INT340E" at acpi0 not configured
< pci0 at mainbus0 bus 0
< pchb0 at pci0 dev 0 function 0 "Intel Core 6G Host" rev 0x07
< ppb0 at pci0 dev 1 function 0 "Intel Core 6G PCIE" rev 0x07: msi
< pci1 at ppb0 bus 1
< vendor "NVIDIA", unknown product 0x139b (class display subclass VGA, rev
0xa2) at pci1 dev 0 function 0 not configured
< vga1 at pci0 dev 2 function 0 "Intel HD Graphics 530" rev 0x06
< wsdisplay1 at vga1 mux 1: console (80x25, vt100 emulation)
< xhci0 at pci0 dev 20 function 0 "Intel 100 Series xHCI" rev 0x31: msi
< usb0 at xhci0: USB revision 3.0
< uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev
3.00/1.00 addr 1
< "Intel 100 Series MEI" rev 0x31 at pci0 dev 22 function 0 not configured
< ahci0 at pci0 dev 23 function 0 "Intel 100 Series AHCI" rev 0x31: msi,
AHCI 1.3.1
< ahci0: port 0: 6.0Gb/s
< ahci0: port 2: 6.0Gb/s
< ahci0: port 3: 1.5Gb/s
< scsibus0 at ahci0: 32 targets
< sd0 at scsibus0 targ 0 lun 0:  SCSI3 0/direct
fixed naa.5002303100bdabee
< sd0: 122104MB, 512 bytes/sector, 250069680 sectors, thin
< sd1 at scsibus0 targ 2 lun 0:  SCSI3 0/direct
fixed naa.5000cca8a8c5b3db
< sd1: 953869MB, 512 bytes/sector, 1953525168 sectors
< cd0 at scsibus0 targ 3 lun 0:  ATAPI
5/cdrom removable
< ppb1 at pci0 dev 28 function 0 "Intel 100 Series PCIE" rev 0xf1
< pci2 at ppb1 bus 2
< ppb2 at pci0 dev 28 function 2 "Intel 100 Series PCIE" rev 0xf1: msi
< pci3 at ppb2 bus 3
< iwm0 at pci3 dev 0 function 0 "Intel Dual Band Wireless AC 8260" rev 0x3a,
msi
< ppb3 at pci0 dev 28 function 3 "Intel 100 Series PCIE" rev 0xf1: msi
< pci4 at ppb3 bus 4
< rtsx0 at pci4 dev 0 function 0 "Realtek RTL8411B Card Reader" rev 0x01:
msi
< sdmmc0 

apu2 em0/dhclient problems

2019-01-27 Thread Edgar Pettijohn
I'm trying to replace my dieing soekris box with an apu2 dmesg below.
However, I can't seem to get em0 to connect to my isp. It will work
when connecting to the soekris box though. So I don't think its the 
interface that is the problem. But everything I try seems to rule out
eachother as the problem, leaving me in a viscious cycle.

I'm going to try disabling pf and after that current. If you have
any other suggestions please send them.

Thanks,

edgar

OpenBSD 6.4 (GENERIC.MP) #364: Thu Oct 11 13:30:23 MDT 2018
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 1996152832 (1903MB)
avail mem = 1926434816 (1837MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0x77fb7020 (7 entries)
bios0: vendor coreboot version "4.0.7" date 02/28/2017
bios0: PC Engines APU2
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S2 S3 S4 S5
acpi0: tables DSDT FACP SSDT APIC HEST SSDT SSDT HPET
acpi0: wakeup devices PWRB(S4) PBR4(S4) PBR5(S4) PBR6(S4) PBR7(S4) PBR8(S4) 
UOH1(S3) UOH3(S3) UOH5(S3) XHC0(S4)
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD GX-412TC SOC, 998.27 MHz, 16-30-01
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
cpu0: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 
16-way L2 cache
cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu0: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD GX-412TC SOC, 998.13 MHz, 16-30-01
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
cpu1: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 
16-way L2 cache
cpu1: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu1: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: AMD GX-412TC SOC, 998.13 MHz, 16-30-01
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
cpu2: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 
16-way L2 cache
cpu2: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu2: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: AMD GX-412TC SOC, 998.13 MHz, 16-30-01
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
cpu3: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 
16-way L2 cache
cpu3: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu3: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu3: smt 0, core 3, package 0
ioapic0 at mainbus0: apid 4 pa 0xfec0, version 21, 24 pins
ioapic1 at mainbus0: apid 5 pa 0xfec2, version 21, 32 pins, remapped
acpihpet0 at acpi0: 14318180 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PBR4)
acpiprt2 at acpi0: bus 1 (PBR5)
acpiprt3 at acpi0: bus 2 (PBR6)
acpiprt4 at acpi0: bus 3 (PBR7)
acpiprt5 at acpi0: bus 4 (PBR8)
acpicpu0 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS
acpicpu1 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS
acpicpu2 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS
acpicpu3 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS
acpibtn0 at acpi0: PWRB
acpicmos0 at acpi0
cpu0: 998 MHz: speeds: 1000 800 600 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "AMD AMD64 16h Root Complex" rev 0x00
pchb1 at pci0 dev 2 function 0 "AMD AMD64 16h Host" rev 0x00
ppb0 at pci0 dev 2 function 2 "AMD AMD64 16h PCIE" 

Re: bsd.mp doesn't boot

2019-01-27 Thread hdrozdow



hdrozdow wrote
> Is there a way to run smt=1 on boot? I suspect that it can be related.

Hello,
I think I was right. OpenBSD 6.3 works with bsd.mp, how to compile 6.4
kernel with smt=1 to confirm this?
I am posting this from 6.3 I would appreciate if someone would point me into
right direction so I can upgrade to 6.4 with smt=1 kernel.

Best Regards,
Hubert




--
Sent from: http://openbsd-archive.7691.n7.nabble.com/openbsd-user-misc-f3.html



Re: OpenBSD 6.4 smtpd local mail delivery missing "From " when .forward (procmail)

2019-01-27 Thread Edgar Pettijohn


On Jan 27, 2019 12:34 AM, Steve Williams  wrote:
>
> On 26/01/2019 11:03 p.m., ed...@deathstar.my.domain wrote:
> > On Sat, Jan 26, 2019 at 08:53:06PM -0700, Steve Williams wrote:
> >> Hi,
> >>
> >> I upgraded from OpenBSD 6.3 to OpenBSD 6.4 today.  I upgraded all packages,
> >> switched to php7, etc.
> >>
> >> I've been running OpenBSD since 2.7 so this is a very known process.
> >>
> >> The upgrade went quite smoothly and is working fine except for my email.  I
> >> have massaged the smtpd.conf file to comply with the OpenBSD 6.4 grammar.
> >>
> >> I run a VERY simple smtpd configuration saving in mbox format.
> >>
> >> I am also using procmail to direct emails into various folders, launched
> >> with a .forward.  This has been working since about 2005 :), historically
> >> with sendmail and more recently, smtpd.
> >>
> >> Unfortunately, email is being written to both my INBOX and the procmail the
> >> folders **incorrectly** post upgrade.
> >>
> >> They are all missing the "From " line that is supposed to indicate the 
> >> start
> >> of a new email message.
> >>
> >> It seems like the email is being passed "raw" to procmail without being
> >> processed by "mail.local" ... or that's my interpretation.
> >>
> >> In the /var/mail/steve file, I can see the following lines prior to the
> >> upgrade:
> >>  From steve+caf_=steve=williams-steve@williamsitconsulting.com Sat Jan 
> >>26
> >> 09:52:48 2019
> >> ^^
> >>
> >> After the upgrade, I'm not getting those "From " lines which appear to be
> >> added by mail.local(8):
> >>      Individual mail messages in the mailbox are delimited by an empty line
> >>      followed by a line beginning with the string "From ".  A line 
> >>containing
> >>      the string "From ", the sender's name and a timestamp is prepended to
> >>      each delivered mail message.
> >>
> >> If there is a .forward, does that preclude mail.local from being called?
> >>
> >> When I remove the .forward, incoming mail is written correctly to the 
> >> INBOX.
> >> ^^^
> >>
> >> I'm hoping I'm missing something in my simple smptd.conf file... but for 
> >> the
> >> life of me, I cannot figure out what it is.
> >>
> >> Here is my smtpd.conf file:
> >> ---
> >> # System aliases file
> >> table aliases file:/etc/mail/aliases
> >>
> >> # Listen on all interfaces as "mail.williamsitconsulting.com"
> >> listen on all hostname "mail.williamsitconsulting.com"
> >>
> >> action "local" mbox alias 
> >>
> >> # Incoming mail for the two domains.
> >> match from any for domain "williamsitconsulting.com" action "local"
> >> match from any for domain "williams-steve.com" action "local"
> >>
> >> forward file
> >> 
> >> "|/usr/local/bin/procmail"
> >>
> >>
> > Have you searched the list? I'm certain something very similar has been 
> > asked/reported recently.
> >
> > I'm curious if the following would work:
> >
> > action "local" mda "/usr/local/bin/procmail" alias 
> >
> > good luck,
> >
> > Edgar
> Hi,
>
> 
>

Sorry. Playing with my mutt config broke it as usual. :)

Thanks for the heads up before too many emails were sent.

Edgar
> I've searched for a couple of hours on the mail list, google, undeadly, 
> etc.  I might just have tunnel vision, but I can't seem to find anything 
> about this.
>
> It's definitely related to the 6.3->6.4 smtpd changes.
>
> I did what you suggested and a quick test reveals that there is no "From 
> " line pre-pended to the mail when it's delivered to my INBOX.
>
> Here's the end of my /var/mail/steve after a test.  Your's was the last 
> email in my inbox prior to running the test
> -
> Have you searched the list? I'm certain something very similar has been 
> asked/reported recently.
>
> I'm curious if the following would work:
>
> action "local" mda "/usr/local/bin/procmail" alias 
>
> good luck,
>
> Edgar
>
> *** This should be a line that starts with "From "
> Return-Path: 
> Delivered-To: st...@williamsitconsulting.com
> Received: from localhost (williamsitconsulting.com [local])
>     by williamsitconsulting.com (OpenSMTPD) with ESMTPA id cbf61bbc
>     for ;
>     Sat, 26 Jan 2019 23:31:01 -0700 (MST)
> From: Steve Williams 
> Date: Sat, 26 Jan 2019 23:31:01 -0700 (MST)
> To: st...@williamsitconsulting.com
> Subject: Teest  of procmail as mda
> Message-ID: 
>
> test
>
>



Re: OpenBSD 6.4 smtpd local mail delivery missing "From " when .forward (procmail)

2019-01-27 Thread Gilles Chehade
On Sat, Jan 26, 2019 at 08:53:06PM -0700, Steve Williams wrote:
> Hi,
> 
> I upgraded from OpenBSD 6.3 to OpenBSD 6.4 today.?? I upgraded all packages,
> switched to php7, etc.
> 
> I've been running OpenBSD since 2.7 so this is a very known process.
> 
> The upgrade went quite smoothly and is working fine except for my email.?? I
> have massaged the smtpd.conf file to comply with the OpenBSD 6.4 grammar.
> 
> I run a VERY simple smtpd configuration saving in mbox format.
> 
> I am also using procmail to direct emails into various folders, launched
> with a .forward.?? This has been working since about 2005 :), historically
> with sendmail and more recently, smtpd.
> 
> Unfortunately, email is being written to both my INBOX and the procmail the
> folders **incorrectly** post upgrade.
> 
> They are all missing the "From " line that is supposed to indicate the start
> of a new email message.
> 
> It seems like the email is being passed "raw" to procmail without being
> processed by "mail.local" ... or that's my interpretation.
> 

you need to tweak your procmail's command so it adds the From delimiter,
there's an option for that.

smtpd used to add the From delimiter for mda, which allowed procmail not
to require that option, however this wasn't correct and when we made the
mda improvements between 6.3 and 6.4, it became impossible to accomodate
procmail without introducing special cases and ugly hacks such as having
explicit search for the string 'procmail' in .forward files.

it wasn't worth it when people can just pass procmail an option.

also don't use procmail, it's trash and there are far better options for
you to use today, fdm being the first to come to mind :-)

-- 
Gilles Chehade @poolpOrg

https://www.poolp.org tip me: https://paypal.me/poolpOrg



Newline-issues with c, i, and a command in sed

2019-01-27 Thread Andreas Kusalananda Kähäri
Hi,

I wonder if this is the expected and correct behaviour of OpenBSD sed(1):

$ cat file
1
2
3

$ sed -e '1c\' -e 'A' file
A2
3

$ sed -e '1i\' -e 'A' file
A1
2
3

$ sed -e '1a\' -e 'A' file
1
A2
3


I was expecting the 'A' to be followed by a newline in all of the above
cases.  I can't for the life of me figure out how to insert that newline
without resorting to using GNU sed.


This is on

OpenBSD 6.4-current (GENERIC.MP) #634: Sat Jan 26 15:39:11 MST 2019
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP


Regards,

-- 
Andreas Kusalananda Kähäri,
National Bioinformatics Infrastructure Sweden (NBIS),
Uppsala University, Sweden.