Just lost an hour or so for a simple task: Configuring sendmail to use smart_host with authentication on CentOS7.

TL;DR: "AUTH=client, available mechanisms do not fulfill requirements" just needed a "yum install cyrus-sasl-plain"

I started with configuring sendmail to use smart_host with auth credentials:

1. Add authorization informations to /etc/mail/authinfo file:
AuthInfo:your-smart-host.tld "U:USERNAME" "P:PASSWORD"

2. Add following lines to /etc/mail/sendmail.mc:
define(`SMART_HOST', `your-smart-host.tld')  
FEATURE(`authinfo')

3. Update sendmail.cf and access.db files:
# cd /etc/mail
# make
# systemctl sendmail restart


But maillog showed temporary failures AUTH=client, available mechanisms do not fulfill requirements.

I checked the servers supported authentication methods with:
# echo -e "ehlo me\nquit" | openssl s_client -starttls smtp -crlf -quiet -connect your-smart-host.tld:25 2>/dev/null | grep AUTH
250-AUTH LOGIN PLAIN


Kept debugging, logging and searching google. Found a forum post where someone solved it by installing cyrus-sasl*.

Well it turned out that only cyrus-sasl-plain was missing and the solution was a simple
yum install cyrus-sasl-plain

[ add comment ] ( 1464 views ) permalink

Since there was no sysresccd with current ZoL 0.6.5.2 modules available I looked around for an alternative.
At http://voidmain.is-a-geek.net/redhat/fe ... cking.html I found a recipe for a custom Fedora-Live-CD.

Follow these steps to create a ZFS-Live-CD:
(I used a Fedora-Live-Xfce-x86_64-21-5.iso I had at hand on my Fedora 21 WS)

Start with a new working directory
mkdir Fedora-Live
cd Fedora-Live
Unpack the Fedora-Live ISO
mkdir iso
mount -o ro,loop Fedora-Live.iso iso
mkdir source
cp -a iso/* source
umount iso
Extract the embedded ext-FS
unsquashfs source/LiveOS/squashfs.img
Extend the ext-FS. Alternatively remove unneded packages inside the chroot. See below.
truncate -s4G squashfs-root/LiveOS/ext3fs.img
resize2fs squashfs-root/LiveOS/ext3fs.img
Mount the ext-FS to chroot into it
mkdir ext3fs
mount -o loop squashfs-root/LiveOS/ext3fs.img ext3fs
mount -o bind /proc ext3fs/proc
mount -o bind /dev ext3fs/dev
mount -o bind /sys ext3fs/sys
cp /etc/resolv.conf ext3fs/etc/
chroot ext3fs
I did remove a bunch of unneeded packages and unused leave packages instead of extending the fs.
One could of course remove even more packages (or single files) to make the system fit on a 512MB stick.
yum erase -y xf* *font* web* *theme* xorg* *gtk* gst* mesa* selinux* trans* tele* pulse* esp*
while package-cleanup --quiet --leaves --exclude-bin | xargs yum remove -y; do true ; done
The ZFS install is straight forward.
yum install -y http://archive.zfsonlinux.org/fedora/zfs-release$(rpm -E %dist).noarch.rpm
yum install -y zfs kernel-devel-$(rpm -q kernel --qf '%{VERSION}-%{RELEASE}.%{ARCH}\n')
dkms status
Exit from the chroot
exit
Copy your current locale settings
cp /etc/vconsole.conf ext3fs/etc/
cp /etc/locale.conf ext3fs/etc/
cp -P /etc/localtime ext3fs/etc/
Instruct getty to autologin root
vi ext3fs/lib/systemd/system/getty@.service

ExecStart=-/sbin/agetty --autologin root --noclear %I $TERM
Clean the unused space for better compression
dd if=/dev/zero bs=128k of=ext3fs/zero
sync
rm -f ext3fs/zero
Unmount the ext-FS and make the squashfs
umount ext3fs/sys
umount ext3fs/proc
umount ext3fs/dev
umount ext3fs
mksquashfs squashfs-root source/LiveOS/squashfs.img -noappend
Update the isolinux configuration with a new cd label, add selinux=0 and remove quiet and rhgb
vi source/isolinux/isolinux.cfg

CDLABEL=ZFS-Live selinux=0

vi source/EFI/BOOT/grub.cfg

LABEL=ZFS-Live selinux=0
Make the new ISO
mkisofs -o ZFS-Live.iso -J -r -hide-rr-moved -hide-joliet-trans-tbl -V ZFS-Live -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table source
Burn to CD or copy to usb flash
livecd-iso-to-disk --format --label ZFS-Live ZFS-Live.iso /dev/sd?-of-your-usb-disk

Done.
[ add comment ] ( 2062 views ) permalink

After building the iPad-serial-to-Cisco-console-management-cable I decided that using minicom was a bit unhandy.

So i hacked together a bit of python with pySerial and added some lines of HTML and Javascript:

Read More...
[ add comment ] ( 50170 views ) permalink related link

There are a couple of pages on the net, describing how to build a serial cable for jailbroken iDevices, e.g. iPhone serial port or Console to routers using the iPad.

Read More...
[ add comment ] ( 1 view ) permalink

After building a serial cable for my iPad to configure Cisco switches I also hacked together a small python-script and a webpage for easier usage.
Details for building the serial cable and the code for the web2serial python script will follow shortly.
[ add comment ] ( 7856 views ) permalink

<Back | 1 | 2 |