You are not logged in.

#1 2005-01-04 12:07:22

quaqo
Member
Registered: 2004-11-11
Posts: 53

[fix] postfix & postfix-tls+sasl with newer db packages

They don't compile anymore... Here is the new fixed PKGBUILD for my postfix-tls+sasl package. If you want to patch the current postfix package, the missing thing is the link against libpthread. ;-)

# Contributor: Federico Quagliata (quaqo) <quaqo@despammed.com>
# Based on the official postfix Arch Linux package
 
pkgname=postfix-tls+sasl
pkgver=2.2
pkgrel=20041230
pkgdesc="Postfix experimental release with TLS and SASL support"
depends=('glibc' 'db' 'pcre' 'cyrus-sasl')
makedepends=('openssl')
# leave etc/mail/aliases in backup() for a few versions until 
# people have migrated or made other provisions
backup=(etc/mail/aliases etc/postfix/aliases etc/postfix/virtual etc/postfix/relocated 
    etc/postfix/access etc/postfix/header_checks etc/postfix/transport 
    etc/postfix/main.cf etc/postfix/master.cf)
install="postfix.install"
url="http://www.postfix.org/"
source=(postfix.patch.bz2 
    postfix 
    postfix.install 
    http://postfix.portal-to-web.de/dist/experimental/postfix-$pkgver-$pkgrel+tls-nonprod.tar.gz)
md5sums=('a3c45ff23ef036143711793fcf2478c3' 'eb5f290655559bbdfbf7b9791aeb4a64' 
     '469ce1ce887bafb2afd243c4c64c843a')
provides=('smtp-server')
conflicts=('postfix')
 
build() {
    cd $startdir/src/postfix-$pkgver-$pkgrel+tls-nonprod
    make makefiles CCARGS="-DUSE_TLS -I/usr/include/openssl -DUSE_SASL_AUTH -I/usr/include/sasl" AUXLIBS="-lssl -lpthread -lcrypto -lsasl2" || return 1
    make OPT="${CFLAGS}" || return 1
 
    sh postfix-install -non-interactive 
    install_root="$startdir/pkg" 
    daemon_directory="/usr/lib/postfix" 
    sample_directory="/etc/postfix/sample" 
    manpage_directory="/usr/man"
 
    cd $startdir/pkg
    cat $startdir/src/postfix.patch |patch -Np0 || return 1
    rm etc/postfix/main.cf~
 
    cd $startdir/pkg
    mkdir etc/rc.d
    install -m 0755 $startdir/src/postfix etc/rc.d/postfix
}

Greetings,
Federico
--
quaqo@despammed.com
http://quaqo.altervista.org

Offline

#2 2005-01-04 22:15:21

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: [fix] postfix & postfix-tls+sasl with newer db packages

Here's a thought as well...

I use srcpac to do exactly this on my production server.  Here's the srcpac rule:

conf_postfix=('#source=(ftp://ftp.porcupine.org#source=(ftp://ftp.aet.tu-cottbus.de/pub/postfix_tls/pfixtls-0.8.18-2.1.3-0.9.7d.tar.gz ftp://ftp.porcupine.org#' '#cd $startdir/src/$pkgname-$pkgver#cd $startdir/src/$pkgname-$pkgvernpatch -p1 < ../pfixtls-0.8.18-2.1.3-0.9.7d/pfixtls.diff#' '#make OPT#make CCARGS="-DUSE_SASL_AUTH -I/usr/include/sasl -DUSE_SSL -I/usr/include/openssl" AUXLIBS="-L/usr/lib -R/usr/lib -lsasl2 -lssl -lcrypto" OPT#')

I think distributing srcpac confs for changes to default packages is probably better than giving out whole new PKGBUILDs.


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#3 2005-01-06 19:06:41

quaqo
Member
Registered: 2004-11-11
Posts: 53

Re: [fix] postfix & postfix-tls+sasl with newer db packages

Yeah... You're right... I didn't know srcpac well, but thanks to you I studied it in detail... :-)

Offline

#4 2005-01-08 21:37:09

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: [fix] postfix & postfix-tls+sasl with newer db packages

how do you use srcpac to upgrade a package?
wouldn't "srcpac -Syub" build everything from source?
Do you have to specify the packages?
"srcpac -Sy postfix" ?
Will that apply the patches, or just build it?
do you have to
"srcpac -Sybo postfix" ?


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#5 2005-01-08 23:22:05

quaqo
Member
Registered: 2004-11-11
Posts: 53

Re: [fix] postfix & postfix-tls+sasl with newer db packages

# srcpac -Syb postfix

To apply patches like the "conf_postfix" thing posted by Xentac, you gotta edit /etc/srcpac.conf.

Offline

#6 2005-01-18 18:13:58

celeron2002
Member
From: Santiago, Chile.
Registered: 2004-02-18
Posts: 150

Re: [fix] postfix & postfix-tls+sasl with newer db packages

i am trying compile the package  but i had a error :

ib -lsasl2 -lssl -lcrypto -L/usr/lib -lpcre -ldb -lnsl -lresolv
gcc: unrecognized option `-R/usr/lib'
/usr/lib/libdb.so: undefined reference to `pthread_condattr_setpshared'
/usr/lib/libdb.so: undefined reference to `pthread_mutexattr_destroy'
/usr/lib/libdb.so: undefined reference to `pthread_mutexattr_setpshared'
/usr/lib/libdb.so: undefined reference to `pthread_mutexattr_init'
/usr/lib/libdb.so: undefined reference to `pthread_mutex_trylock'
collect2: ld returned 1 exit status
make: *** [master] Error 1
make: *** [update] Error 1
make: *** [update] Error 2
==> ERROR: Build Failed.  Aborting...
Error: Failed to build "postfix"
root@Celerondomain celeron # 

i have db 4.2.52-1 :S

PD: i used srcpac


irc.bsd.cl #linux
irc.freenode.org #archlinux-es

Offline

#7 2005-01-18 18:29:25

quaqo
Member
Registered: 2004-11-11
Posts: 53

Re: [fix] postfix & postfix-tls+sasl with newer db packages

I think you're missing "-lpthread"... My PKGBUILD uses that. wink

Offline

#8 2005-05-15 14:57:05

pixel
Member
From: Living in the Server Room
Registered: 2005-02-21
Posts: 119

Re: [fix] postfix & postfix-tls+sasl with newer db packages

quago, can you post your PKGBUILD to AUR so we can vote for it. IMHO postfix-sasl-tls package should be in the 'community' repo.


Favorite systems: ArchLinux, OpenBSD
"Yes, I love UNIX"

Offline

#9 2005-05-15 15:53:07

quaqo
Member
Registered: 2004-11-11
Posts: 53

Re: [fix] postfix & postfix-tls+sasl with newer db packages

Done. smile
Ehm... And I'm quaqo, nor quago. tongue

Bye,
Federico
www.quaqo.org

Offline

#10 2005-05-15 20:47:03

pixel
Member
From: Living in the Server Room
Registered: 2005-02-21
Posts: 119

Re: [fix] postfix & postfix-tls+sasl with newer db packages

I'm sorry Quaqo for the mispelling, my bad..
anyway thanks for the contribution to the AUR.

People, please vote. I think this package is very important, hope it will be moved to the community repo soon.


Favorite systems: ArchLinux, OpenBSD
"Yes, I love UNIX"

Offline

#11 2005-05-16 07:27:46

quaqo
Member
Registered: 2004-11-11
Posts: 53

Re: [fix] postfix & postfix-tls+sasl with newer db packages

Never mind... wink

Greetings,
Federico (quaqo)
www.quaqo.org

Offline

#12 2005-05-16 12:26:47

pixel
Member
From: Living in the Server Room
Registered: 2005-02-21
Posts: 119

Re: [fix] postfix & postfix-tls+sasl with newer db packages

quaqo, im getting this error when trying to authenticate from localhost:

May 16 08:22:15 one postfix/smtpd[2516]: connect from localhost[127.0.0.1]
May 16 08:22:15 one postfix/smtpd[2516]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory

I thought cyrus-sasl use pam by default. Do you know the workaround?


Favorite systems: ArchLinux, OpenBSD
"Yes, I love UNIX"

Offline

#13 2005-05-16 12:54:08

quaqo
Member
Registered: 2004-11-11
Posts: 53

Re: [fix] postfix & postfix-tls+sasl with newer db packages

Google is full of answers... wink
There are a lot of Postfix+SASL howto too...

See ya,
quaqo

Offline

#14 2005-05-16 13:22:54

pixel
Member
From: Living in the Server Room
Registered: 2005-02-21
Posts: 119

Re: [fix] postfix & postfix-tls+sasl with newer db packages

i solved it.
Your package doesnt work out of the box. You need to add to postinstall script some things:

1. create /usr/lib/sasl2/smtpd.conf

content of the file:
pwcheck_method:saslauthd

2. append to /etc/postfix/main.cf the following lines:

# SASL SUPPORT FOR CLIENTS
#
# The following options set parameters needed by Postfix to enable
# Cyrus-SASL support for authentication of mail clients.
#
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = $myhostname
broken_sasl_auth_clients = yes
smtpd_delay_reject = yes
smtpd_client_restrictions = permit_sasl_authenticated,permit_mynetworks,check_relay_domains

smtpd_recipient_restrictions =permit_mynetworks,permit_sasl_authenticated,permit_auth_destination,reject

smtpd_sasl_security_options = noanonymous


Favorite systems: ArchLinux, OpenBSD
"Yes, I love UNIX"

Offline

#15 2005-05-16 13:28:51

quaqo
Member
Registered: 2004-11-11
Posts: 53

Re: [fix] postfix & postfix-tls+sasl with newer db packages

It doesn't work out of the box 'cause imo it shouldn't. There are plenty of bad configured servers around: people should install the package and configure it on their own so that they'll read the documentation. smile

Surely, if you guys think that I'm wrong I'll add that kind of hack. wink

Offline

#16 2005-05-16 14:22:36

pixel
Member
From: Living in the Server Room
Registered: 2005-02-21
Posts: 119

Re: [fix] postfix & postfix-tls+sasl with newer db packages

I already knew how to setup postfix-sasl but the thing that was causing all the trouble was the missing /etc/lib/sasl2/smtpd.conf which should be there out-of-the-box (at least other distros has it)

Also IMHO, reading docs is one thing (personally i love it) but the other is that things SHOULD be working after installing package. It took me a while to figure out that im missing this ONE file. All my other configuration files were perfect.


Favorite systems: ArchLinux, OpenBSD
"Yes, I love UNIX"

Offline

#17 2005-05-16 14:26:52

quaqo
Member
Registered: 2004-11-11
Posts: 53

Re: [fix] postfix & postfix-tls+sasl with newer db packages

Ok. I agree. smile

I'm not sure whether that file should be in this package or not... The other distributions ship it in the postfix or cyrus-sasl package?

Offline

#18 2005-05-16 19:59:31

pixel
Member
From: Living in the Server Room
Registered: 2005-02-21
Posts: 119

Re: [fix] postfix & postfix-tls+sasl with newer db packages

It must be done by postfix package (smtpd.conf). Different applications has different conf files for authentication inside /usr/lib/sasl2/


Favorite systems: ArchLinux, OpenBSD
"Yes, I love UNIX"

Offline

#19 2005-05-16 20:01:54

quaqo
Member
Registered: 2004-11-11
Posts: 53

Re: [fix] postfix & postfix-tls+sasl with newer db packages

Okee. Thanks for your support. I'll fix it tomorrow morning. smile

Offline

Board footer

Powered by FluxBB