Find out which mouse button is which with:
xev | grep -i button
On my mouse, 6 and 7 are Back and Forward buttons.
Then add this lines ~/.xbindkeysrc
## Logitech mouse Back and Forward
# Back
"xte 'keydown Alt_L' 'key Left' 'keyup Alt_L'"
b:6
# Forward
"xte 'keydown Alt_L' 'key Right' 'keyup Alt_L'"
b:7
Note: Someone is using xvkbd
instead of xte
. They both do similar things.