Sewer lines need to be vented in order not to create a pressure differential that causes problems. There are a couple different approaches, but that shit isn't one of them; it kind of looks like something a plumber just threw in there to solve their immediate problem and then scooted away from free of consequence.
I wouldn't recommend plugging it, as you might be taking away a needed vent from the whole system... the two options I could see would be:
- Hire a plumber to fix the bullshit in more proper fashion
- Replace that rubber hose at the end with a longer hose, and put the open end at the bottom of a bucket that you keep filled with water (either in the sink or on the ground). You're effectively creating a weird custom type of P-trap. It's ghetto but it'll solve the smell problem while still allowing pressure to equalize, I think. You might want to ask your plumber if that would be a sensible solution just to double-check.