Bad sectors on boot disk
I'm getting console messages like: wd0a: uncorrectable data error reading fsbn 530469 of ... I found this page: How to repair bad sectors on HDD in OpenBSD (Part I) at: https://www.s-vp.com/blog/post/how-to-repair-bad-sectors-on-hdd-in-openbsd-part-i Question 1: Is it possible to repair "wd0a"? Do I need another boot disk to do the repair? I'm in the process of building another boot disk with the identical OpenBSD version. I'm assuming it will take less time this way since I can copy the settings from a backup. Question 2: Once I build the new boot disk mentioned in Question 1 I thought I'd clone it and keep it up to date using rsync. Is the page: OpenBSD 5.5 and later | cloning a disk the easy way at: https://bytesandbones.wordpress.com/2014/09/23/openbsd-5-5-and-later-cloning-a-disk-the-easy-way/ Is this set of instructions complete or is there a better set of instructions? Will this disk be bootable after cloning or do I have to install OpenBSD on the clone first to make the disk bootable? Is this a suitable way to maintain a spare clone of my boot disk? My data is kept on other hard disks in my system. Thanks, Joe. PS. My email web page flashed so I resent the message. I hope this gets through. Sorry if it's a duplicate.
Re: OpenSMTPD "syntax error" and other problems
The "smtpd.conf" man page states: relay [backup [mx]] [as address] ... ... If the as parameter is specified, smtpd(8) will rewrite the sender advertised in the SMTP session. address may be a user, a domain prefixed with ‘@’, or an email address, causing smtpd(8) to rewrite the user-part, the domain-part, or the entire address, respectively. ... I tried this: relay as "@my-domain.com" But I get a "syntax error"? MS Outlook users get "550 Invalid recipient" errors when trying to send mail outside of our domain. The mail log entries are like: Jan 16 07:36:28 myserver smtpd[70549]: b76cb7a2aa7f61b8 smtp event=failed-command command="RCPT TO:" result="550 Invalid recipient" Using the command "mail" to compose a message and send it works. My "smtp.conf" is: listen on all pki mail.example.com certificate "/etc/ssl/my-domain.com.crt" pki mail.example.com key "/etc/ssl/my-domain.com.key" table aliases file:/etc/mail/aliases accept from any for domain "my-domain.com" alias deliver to mbox accept for local alias deliver to mbox accept from local for any relay # relay relay as "@my-domain.com"
Small Business email server using OpenSMTPD
I'm trying to move a small business email server from an older OpenBSD using sendmail to one with OpenBSD 6.0 using OpenSMTPD. The current email server has: - a certificate (used by StartTLS) - MS Outlook clients using pop3 to retrieve their mail - OpenWebmail for non-local client access I've not found the correct search results to show to how to do this. What I'd really like to find is an example "smtpd.conf" showing the required entries. Can anyone point me in the correct direction? Thanks, Joe
USB2 disk running at USB1 speed
I have a USB2/Firewire external drive with a removable tray I use for backup. When the disk is connected in the following sequence: 1. connect USB cable 2. insert disk on removable tray into enclosure 3. turn on power switch to drive 4. turn on key to power disk The backup runs at USB1 speeds. If I change the sequence to: 1. insert disk on removable tray into enclosure 2. turn on power switch to drive 3. turn on key to power disk 4. connect USB cable The backup runs at USB2 speeds. The difference is backup times is quite dramatic. A few hours for USB2 and most of the day at USB1. The disk is properly mounted at the start and unmounted at the end of the backup. The portion of the dmesg added when the disk is attached is: umass0 at uhub3 port 5 configuration 1 interface 0 umass0: JNC Incorporated USB2.0 Storage Devic?, rev 2.00/0.01, addr 2 umass0: using SCSI over Bulk-Only scsibus2 at umass0: 2 targets sd0 at scsibus2 targ 1 lun 0: HDS72251, 2VLAT20, 0 0 SCSI0 0/direct fixed sd0: 117800MB, 117800 cyl, 64 head, 32 sec, 512 bytes/sec, 241254720 sec total Disconnecting the disk adds these line to dmesg: umass0: at uhub3 port 5 (addr 2) disconnected sd0 detached scsibus2 detached umass0 detached Why am I getting this behavior? Other than using method #2 to connect the disk to my system, is there anything I can do always get USB2 speeds? Joe ---Complete dmesg output--- OpenBSD 4.1 (GENERIC) #0: Tue May 1 15:19:26 CDT 2007 [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC cpu0: AMD Athlon(tm) XP 2400+ (AuthenticAMD 686-class, 256KB L2 cache) 2.01 GHz cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE real mem = 267939840 (261660K) avail mem = 236802048 (231252K) using 3301 buffers containing 13520896 bytes (13204K) of memory mainbus0 (root) bios0 at mainbus0: AT/286+ BIOS, date 10/03/03, BIOS32 rev. 0 @ 0xfdad0, SMBIOS rev. 2.3 @ 0xf0630 (22 entries) bios0: MSI MS-6712 apm0 at bios0: Power Management spec V1.2 apm0: AC on, battery charge unknown apm0: flags 30102 dobusy 0 doidle 1 pcibios0 at bios0: rev 2.1 @ 0xf/0x1 pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xf7fc0/208 (11 entries) pcibios0: PCI Interrupt Router at 000:17:0 (VIA VT8235 ISA rev 0x00) pcibios0: PCI bus #1 is the last bus bios0: ROM list: 0xc/0xf000 acpi at mainbus0 not configured cpu0 at mainbus0 pci0 at mainbus0 bus 0: configuration mode 1 (no bios) pchb0 at pci0 dev 0 function 0 VIA VT8377 PCI rev 0x80 ppb0 at pci0 dev 1 function 0 VIA VT8377 AGP rev 0x00 pci1 at ppb0 bus 1 vga1 at pci1 dev 0 function 0 NVIDIA GeForce4 MX 440 AGP rev 0xa2 wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) ahc0 at pci0 dev 6 function 0 Adaptec AHA-29160 U160 rev 0x02: irq 10 scsibus0 at ahc0: 16 targets st0 at scsibus0 targ 1 lun 0: ECRIX, VXA-1, 2A6A SCSI2 1/sequential removable dc0 at pci0 dev 8 function 0 ADMtek AN983 rev 0x11: irq 12, address 00:04:5a:72:31:3d ukphy0 at dc0 phy 1: Generic IEEE 802.3u media interface, rev. 1: OUI 0x000749, model 0x0001 uhci0 at pci0 dev 16 function 0 VIA VT83C572 USB rev 0x80: irq 11 usb0 at uhci0: USB revision 1.0 uhub0 at usb0 uhub0: VIA UHCI root hub, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1 at pci0 dev 16 function 1 VIA VT83C572 USB rev 0x80: irq 10 usb1 at uhci1: USB revision 1.0 uhub1 at usb1 uhub1: VIA UHCI root hub, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered uhci2 at pci0 dev 16 function 2 VIA VT83C572 USB rev 0x80: irq 5 usb2 at uhci2: USB revision 1.0 uhub2 at usb2 uhub2: VIA UHCI root hub, rev 1.00/1.00, addr 1 uhub2: 2 ports with 2 removable, self powered ehci0 at pci0 dev 16 function 3 VIA VT6202 USB rev 0x82: irq 12 usb3 at ehci0: USB revision 2.0 uhub3 at usb3 uhub3: VIA EHCI root hub, rev 2.00/1.00, addr 1 uhub3: 6 ports with 6 removable, self powered viapm0 at pci0 dev 17 function 0 VIA VT8235 ISA rev 0x00 iic0 at viapm0 iic0: addr 0x2f 04=00 06=03 07=00 0c=00 0d=07 0e=84 0f=00 10=c0 11=11 12=00 13=60 14=14 15=62 16=01 17=06 pciide0 at pci0 dev 17 function 1 VIA VT82C571 IDE rev 0x06: ATA133, channel 0 configured to compatibility, channel 1 configured to compatibility wd0 at pciide0 channel 0 drive 0: ST3160812A wd0: 16-sector PIO, LBA48, 152627MB, 312581808 sectors atapiscsi0 at pciide0 channel 0 drive 1 scsibus1 at atapiscsi0: 2 targets cd0 at scsibus1 targ 0 lun 0: Compaq, DVD-ROM DVD-114, 1.14 SCSI0 5/cdrom removable wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2 cd0(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 2 wd1 at pciide0 channel 1 drive 0: WDC WD1200BB-16CAA1 wd1: 16-sector PIO, LBA, 114473MB, 234441648 sectors wd1(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 5 auvia0 at pci0 dev 17 function 5 VIA VT8233 AC97 rev 0x50: irq 5 ac97: codec id 0x414c4760 (Avance Logic ALC655 rev 0) audio0 at auvia0 vr0 at pci0 dev 18 function 0 VIA RhineII-2 rev 0x74: irq 11, address 00:0c:76:5c:ba:08 ukphy1 at
no incoming message for sendmail
Today I upgraded my mail server from OpenBSD 3.7 to 4.0 (patches 2 thru 10 applied) and even though ps -aux shows sendmail: accepting connections (sendmail) I'm not getting any incoming messages. I tried several times to send myself messages and had others send me messages from various services but noting is coming in. To create my sendmail.cf file I started with openbsd-proto.mc and filled in my domain information. My my.mc file is (minus the dnl lines: divert(-1) divert(0)dnl VERSIONID(`@(#)openbsd-proto.mc $Revision: 1.11 $')dnl OSTYPE(openbsd)dnl define(`confPRIVACY_FLAGS', `authwarnings,needmailhelo,noexpn,novrfy,nobodyreturn')dnl define(`confCW_FILE', `-o MAIL_SETTINGS_DIR`'local-host-names')dnl define(`confCT_FILE', `-o MAIL_SETTINGS_DIR`'trusted-users')dnl define(`confLOG_LEVEL',`15')dnl FEATURE(nouucp, `reject')dnl FEATURE(`access_db', `hash -o -TTMPF /etc/mail/access')dnl FEATURE(`blacklist_recipients')dnl FEATURE(`use_cw_file')dnl FEATURE(`mailertable', `hash -o /etc/mail/mailertable')dnl FEATURE(`use_ct_file')dnl FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable')dnl FEATURE(genericstable, `hash -o /etc/mail/genericstable')dnl FEATURE(always_add_domain)dnl FEATURE(redirect)dnl FEATURE(`no_default_msa')dnl DAEMON_OPTIONS(`Family=inet, Address=0.0.0.0, Name=MTA')dnl DAEMON_OPTIONS(`Family=inet6, Address=::, Name=MTA6, M=O')dnl DAEMON_OPTIONS(`Family=inet, Address=0.0.0.0, Port=587, Name=MSA, M=E')dnl DAEMON_OPTIONS(`Family=inet6, Address=::, Port=587, Name=MSA6, M=O, M=E')dnl CLIENT_OPTIONS(`Family=inet, Address=0.0.0.0')dnl CLIENT_OPTIONS(`Family=inet6, Address=::')dnl define(`confBIND_OPTS', `WorkAroundBroken')dnl MASQUERADE_AS(`my-company.com')dnl FEATURE(masquerade_envelope)dnl FEATURE(masquerade_entire_domain)dnl MAILER(local)dnl MAILER(smtp)dnl LOCAL_RULESETS HMessage-Id: $CheckMessageId SCheckMessageId R $+ @ $+ $@ OK R$* $#error $: 553 Header Error I've removed the STARTTLS and CLAMAV settings I was using. I copied the /etc/mail files from my previous installation: - relay-domains (contains my domain) - local-host-names (contains various names for my server) - aliases (aliases.db created using: newaliases) - access (access.db created using: makemap hash /etc/mail/access /etc/mail/access) - all other /etc/mail files are unchanged I also set the confLOG_LEVEL to 15 so that I can see more information on the incoming and outgoing messages thinking that would help. I see nothing for incoming message but lots of information on outgoing messages. sendmail.cf was created and sendmail was started using: cd /usr/share/sendmail/cf m4 /usr/share/sendmail/m4/cf.m4 my.mc my.cf mv my.cf /etc/mail/sendmail.cf kill `head -1 /var/run/sendmail.pid` /usr/sbin/sendmail -L sm-mta -C/etc/mail/sendmail.cf -bd -q30m These lines from pf.conf in my firewall redirect incoming traffic to my mail server. This worked before I upgraded. ext_if = xl2 myAddress = 192.168.0.1 mailServer = 192.168.2.2 rdr on $ext_if proto tcp from any to $myAddress port 25 - $mailServer port 25 My ISP supplies a router/DSL modem (Cayman Model 3346 DSL Ethernet Switch) and I've redirected all it's incoming traffic to my firewall. I don't know what might have changed from OpenBSD 3.7 to 4.0 in sendmail. Does anyone have suggestions for what might be the problem with sendmail? I wouldn't think my ISP would block my incoming messages.